Some information for C#+MSSql newbie

Actually that newbie is me XP.

I have experience VS2003+.NET framework 1.1+MSSql 2000 before and now playing with VS2008+.NET framework 3.0+MSSql 2005.

1. if you get data out and want to make a excel document out of it under a web application environment,  by using COM (Component Object Model), don’t do it this way because COM is not thread safe.

2. MSSql 2005 provide server-subscribe mode from one or both directions, generating report with web service, etc useful new features.

3. When you get data from database, please trim() it, there could be white spaces added to their end, I don’t know why.

4. if you intelliSense(autocomplete) is not working, check your .cs properties, Build Action should be compile.

5. useful hotkey: format document – Ctrl+E then D

activate intelliSense – Ctrl+K then L

6. the default access modifier for C# is private.

7. String is the same thing as string is C#.

8. add a @ before a string literal if you don’t want to use escape character. e.g. @”a slash \”

9. remember to click update reference in VS to take effect after you change some external reference.

10. I forgot, add later if there are more to come.

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s