Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Adding a column in a dataset with decimal
Message
De
22/05/2013 19:23:12
 
 
À
22/05/2013 15:44:16
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Versions des environnements
Environment:
VB 9.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01574528
Message ID:
01574553
Vues:
42
>When I add a column in a dataset, I may have something like this:
>
>
>oData.oDataSet.Tables(0).Columns.Add(lcField, GetType(System.String))
>oData.oDataSet.Tables(0).Columns(lcField).MaxLength = lnLength
>
>
>But, when I need to create a Double type, I would like to specify the number of decimals. I cannot seem to find the property for that. Anyone would know?

No, the datable doesn't contain the precision information.
Here's what a decimal column in a typed dataset looks like in the xml file:
<xs:element name="tqty" type="xs:decimal" minOccurs="0" />
As you see, there in no way to store the precision. Similarly, there is no way to store the size of a string.
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