Sijin Joseph's blog

My experiences with .Net

October 2004 - Posts

Damn CS-RCS
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.
Great interop site
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.
Posted: Oct 18 2004, 05:03 PM by Sijin Joseph
Filed under:
Differences between OleDb and Sql in ADO.Net

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.

Posted: Oct 13 2004, 09:57 AM by Sijin Joseph | with 1 comment(s)
Filed under:
Build Management in .Net
I recently had to do some research on build management techniques for .Net. Atleast till MSBuild comes out with VS.Net 2005, the existing tools available from MS are not upto the mark. Here are some intresting links and tools i came across

http://www.theserverside.net/articles/showarticle.tss?id=NAnt
http://www.15seconds.com/issue/040621.htm
http://radio.weblogs.com/0106046/stories/2002/08/10/supportingVsnetAndNant.html

Slingshot is a tool that converts .sln files to NAnt build scripts ,it is part of the NAntContrib project, there are some great tools
for NAnt in this project
http://sourceforge.net/projects/nantcontrib

For continuous integration
http://hipponet.sourceforge.net/
http://cruisecontrol.sourceforge.net/

Team Development Guide from MS and MSBuildIt
http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=94FDB8C8-5A87-4545-AF75-6053F32C7ECA
http://www.microsoft.com/downloads/details.aspx?FamilyID=b32497b0-77f7-4831-9c55-58bf3962163e&DisplayLang=en

Posted: Oct 12 2004, 09:12 AM by Sijin Joseph | with 3 comment(s)
Filed under:
Two great tools
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,
Posted: Oct 11 2004, 10:40 AM by Sijin Joseph
Filed under:
More Posts