Yesterday, i installed
CS-RCS from
ComponentSoftware, i was looking for a configuration management component which we could integrate into our product which needs to support document versions. ( I still haven't found any suitable candidates) So anyways i try to open the solution today and it says that source control status is invalid. After beating my head for one hour trying to figure out what was wrong with VSS i saw that the repository selected was CS-RCS...aaargh, the least these guys could have done was provide a SCC switcher like
these guys and
this guy and
this guy and
this guy have already done. Is that too much to ask? (Even i didn't know there were so many options before i googled)
It turns out that CS-RCS changed my SCC provider to CS-RCS now to restore it i had to execute ssint.exe from vss\win32 folder and i could access source control now. But the episode was really nasty, especially coming from a company that makes configuration management tools. So if any guys from ComponentSoftware are listening, please provide a SCC switcher or atleast restore the previous one on uninstallation.
Came across a
great site for Interop related info . The site is by Mattias Sjögren a MVP. It has great links to sample code, FAQ's and articles on .Net Interop.
I usually develop applications that use SQL server so i never really had a chance to work with Access DB before. So yesterday i had to write some data to an access DB and i thought how different can it be. So i set up my queries and parameters as usual, althought it felt a little strange having to write SQL code in VS.Net :) , and i run the app and obviously it bombs. That was expected but the error was a little strange what is got was "Data type mismatch in criteria." hmm...so i look up my OleDbTypes that i have setup for my params seemed OK to me.
The best way to debug such problems is to see how VS.Net generated code is doing it, so i created a new solution and dragged the table from Server Explorer and Created a dataset and datagrid and had a up and running dataform in under 2 minutes (That's what i love about VS.Net, try doing that in eclipse). I looked at the code and i realized how mistaken i was about the similarities between Sql and Access.
Ok first of all the parameters, they don't have names, they're just '?' so instead of saying
select * from table where field1 = @var1 and field2 = @var2 you would write the query as
select * from table where field1 = ? and field2= ?
So you have to add params to the command depending on the order they appear in the query.
Ok so i fixed that problem but i was still getting the Data type mismatch error..well in my case it turned out that it was something quite simple, those pesky DateTime's again. I was using OleDbType.DBTimeStamp for my field whereas i should have been using OleDbType.Date. Also from the generated code i realized that Text field maps to OleDbType.VarWChar and Memo fields map to OleDbType.VarWChar with size zero rather than OleDbType.LongVarChar as i initially thought. Came across a good link that maps these DataTypes.
Came across two great tools today
1.
NUnitForms - Want to do unit testing for WinForms, this project is for you. Start contributing.
2.
BKResizer - I one problem i always faced with WinForms development was resolution independence. BKResizer solves that problem for me, and is not to hard on my pocket either,