Home
Forums
New posts
Search forums
Articles
Latest reviews
Search resources
Members
Current visitors
Newsgroups
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Home
Forums
Newsgroups
Microsoft DotNet
Microsoft ADO .NET
Set dataset element default value to empty string
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Kevin Yu [MSFT], post: 3701548"] Hi moondaddy, First of all, I would like to confirm my understanding of your issue. From your description, I understand that you need to set the default value of a DataColumn to an empty string at design time. If there is any misunderstanding, please feel free to let me know. This can be achieved by setting the default attribute for the column. Here are the steps: 1. In the DataSet Designer, switch to XML view for the DataSet. 2. Find the element for the corresponding column. For example, I'm going to set default value for a column named "ShipName". The element in the schema might look like the following: <xs:element name="ShipName" type="xs:string" minOccurs="0" /> 3. Now we add the default attribute to the element, using default="". <xs:element name="ShipName" type="xs:string" minOccurs="0" default ="" /> Now the default value has been set to an empty string. For more information, please check the following link: [URL]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/xmlsdk/htm/[/URL] xsd_ref_9ugk.asp HTH. If anything is unclear, please feel free to reply to the post. Kevin Yu ======= "This posting is provided "AS IS" with no warranties, and confers no rights." [/QUOTE]
Verification
Post reply
Home
Forums
Newsgroups
Microsoft DotNet
Microsoft ADO .NET
Set dataset element default value to empty string
Top