In SqlDbType enum there are constants for all data types, supported by SQL Server (if you use OleDb namespace instead of SqlClient, use OleDbType enum).
I use this for ALL fields - there are situations, in which is impossible to do this in other way. Example: you construct SQL SELECT and add to WHERE clause condition for VARCHAR field:
"... WHERE SomeField = '" & NewString & "'"
Will this work if NewString = "asdf'ghjk" ???
Plamen Ivanov
MCSD .NET Early Achiever and MCAD .NET Charter Member (VB .NET/SQL Server 2000)
MCSD (VB 6.0/SQL Server 2000) br>
VB (.NET) - what other language do you need in the whole Universe?...