Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
DataType for VarChar
Message
De
31/03/2014 17:45:52
 
 
À
31/03/2014 17:13:13
Information générale
Forum:
ASP.NET
Catégorie:
Bases de données
Versions des environnements
Environment:
VB 9.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01597800
Message ID:
01597809
Vues:
27
>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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform