SqlTypes vs. SqlDbType Confusion

Something to watch out for.  I jsut caught myself on this.  I am getting easily confused by the SqlTypes class and the SqlDbType enumeration.  Thanks to Erik Porter for reminding me of this.  SqlTypes are used when getting data out of the database.  SqlDbType is used with SqlParameters for calling commands.  While not a 100% accurate, I am going to think of them in general like this: SqlTypes are for getting data out while SqlDbType is used for putting data in.

Wally "Sick for a week with a cold" McClure

No Comments