Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
DataType for VarChar
Message
From
31/03/2014 17:45:52
 
 
To
31/03/2014 17:13:13
General information
Forum:
ASP.NET
Category:
Databases
Environment versions
Environment:
VB 9.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01597800
Message ID:
01597809
Views:
26
>The following are some of the various possibilities for .NET to recognize a data type from a database field:
>
>System.String
>System.Int32
>System.DateTime
>System.Boolean
>System.Decimal
>System.Byte[]
>System.TimeSpan
>
>I am trying to verify if the SQL Server field is a VarChar, will the recognized data type be "System.VarChar"?

The only way I know is to query SQL Sever.
use mydb
exec sp_columns mytable

returns the structure of the table.
You can fill a datatable, find the column in the datatable and you'll have the SQL datatype
Anyone who does not go overboard- deserves to.
Malcolm Forbes, Sr.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform