Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Adding a column in a dataset with decimal
Message
From
22/05/2013 19:23:12
 
 
To
22/05/2013 15:44:16
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Environment versions
Environment:
VB 9.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01574528
Message ID:
01574553
Views:
43
>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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform