Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Creating a character field in a dataset
Message
From
16/03/2006 21:04:15
 
 
To
16/03/2006 18:21:51
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Miscellaneous
Thread ID:
01105142
Message ID:
01105174
Views:
24
This message has been marked as the solution to the initial question of the thread.
Michel,

You probably need to set the MaxLength property of a DataColumn:
            loDataSet.Tables(0).Columns.Add("Name", GetType(System.String))
            loDataSet.Tables(0).Columns("Name").MaxLength = 5
~~Bonnie



>If I have the following code to create a dataset:
>
>
>            ' Create a dataset
>            loDataSet.Tables.Add("Temp")
>            loDataSet.Tables(0).Columns.Add("Name", GetType(System.String))
>            loDataSet.Tables(0).Columns.Add("Length", GetType(System.Int32))
>            loDataSet.Tables(0).Columns.Add("LastWriteTime", GetType(System.DateTime))
>
>
>How can I update the first column line to create a character field of a specific length instead of a memo field?
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform