473,326 Members | 2,438 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Filling typed datatset error,,,,

basicaly i want to set this XSD up so that it ALLOWS null values.. and
doesnt through me any stupid constriant errors..

How can i set a default on a datetime field?
<xs:sequence>

<xs:element name="id" msdata:ReadOnly="false" msdata:AutoIncrement="false"
type="xs:int" />

<xs:element name="body" type="xs:string" minOccurs="0" codegen:nullValue=""
/>

<xs:element name="active" type="xs:boolean" codegen:nullValue="0"
default="0" />

<xs:element name="approved" type="xs:boolean" codegen:nullValue="0"
default="0" />

<xs:element name="approved_by" type="xs:int" codegen:nullValue="0"
default="0" />

<xs:element name="approved_date" type="xs:string" minOccurs="0"
codegen:nullValue="1980-01-01T00:00:00" />

<xs:element name="create_date" type="xs:string" minOccurs="0" />

<xs:element name="create_by" type="xs:int" minOccurs="0"
codegen:nullValue="0" default="0" />

<xs:element name="update_date" type="xs:string" minOccurs="0" />

<xs:element name="update_by" type="xs:int" minOccurs="0"
codegen:nullValue="0" default="0" />

<xs:element name="creator" type="xs:string" minOccurs="0"
codegen:nullValue="" default="" />

<xs:element name="approver" type="xs:string" minOccurs="0"
codegen:nullValue="" default="" />

<xs:element name="updator" type="xs:string" minOccurs="0"
codegen:nullValue="" default="" />

</xs:sequence>
Nov 18 '05 #1
1 1063
For me minOccurs="0" works just fine. What namespaces do you have in the
<xs:schema ...>? I have the following:

xmlns:mstns="http://tempuri.org/dsImmunization.xsd"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"
xmlns:msprop="urn:schemas-microsoft-com:xml-msprop"

Also, you set type="xs:string". I set type="xs:date". Example:

<xs:element name="RecommendedDate" type="xs:date" minOccurs="0" />

Eliyahu

"Darren Clark" <dc******@hotmail.com> wrote in message
news:uZ**************@tk2msftngp13.phx.gbl...
basicaly i want to set this XSD up so that it ALLOWS null values.. and
doesnt through me any stupid constriant errors..

How can i set a default on a datetime field?
<xs:sequence>

<xs:element name="id" msdata:ReadOnly="false" msdata:AutoIncrement="false"
type="xs:int" />

<xs:element name="body" type="xs:string" minOccurs="0" codegen:nullValue="" />

<xs:element name="active" type="xs:boolean" codegen:nullValue="0"
default="0" />

<xs:element name="approved" type="xs:boolean" codegen:nullValue="0"
default="0" />

<xs:element name="approved_by" type="xs:int" codegen:nullValue="0"
default="0" />

<xs:element name="approved_date" type="xs:string" minOccurs="0"
codegen:nullValue="1980-01-01T00:00:00" />

<xs:element name="create_date" type="xs:string" minOccurs="0" />

<xs:element name="create_by" type="xs:int" minOccurs="0"
codegen:nullValue="0" default="0" />

<xs:element name="update_date" type="xs:string" minOccurs="0" />

<xs:element name="update_by" type="xs:int" minOccurs="0"
codegen:nullValue="0" default="0" />

<xs:element name="creator" type="xs:string" minOccurs="0"
codegen:nullValue="" default="" />

<xs:element name="approver" type="xs:string" minOccurs="0"
codegen:nullValue="" default="" />

<xs:element name="updator" type="xs:string" minOccurs="0"
codegen:nullValue="" default="" />

</xs:sequence>

Nov 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Efy. | last post by:
Hello, The following problam description I did not need to write, I just copied from the groups from others which met the error and allways the thread was 1 artical the problem was never...
0
by: Ravi | last post by:
Hi all, I am facing a strange problem ! I have a machine with Win 2000 Advanced Server, VS.Net 2003 and Biztalk Server 2004 with HL7 Accelrator installed. Biztalk is working fine..no problems "...
1
by: Nedu N | last post by:
Hi All, I am facing problem in copying content of table from a untyped dataset into to a table inside the typed dataset. I wanted to copy the data into typed dataset in order to ease the further...
1
by: Ersin Gençtürk | last post by:
I have 2 typed data tables inherited from the same dataset schema One called : table A with an identity column x column x is constrained to be unique. Other one is : table B with an identity...
3
by: crjunk | last post by:
I have a 3 table in my DataSet that I'm filling with data. After I've filled these 3 tables, I'm then trying to run a query that will fill a 4th table in the DataSet with data from the three...
0
by: Sparky | last post by:
Hi, I am trying to use a typed dataset with a web service and am having problems with type casting errors. I have a typed dataset which is in both my web service and my consuming application....
0
by: Derek Vincent | last post by:
Why am I having problems filling my dataset when I select fields of type varchar(350) from interbase? I can fill the dataset when I select every other field in the table but I receive and error...
669
by: Xah Lee | last post by:
in March, i posted a essay “What is Expressiveness in a Computer Languageâ€, archived at: http://xahlee.org/perl-python/what_is_expresiveness.html I was informed then that there is a academic...
8
by: Harry Strybos | last post by:
Visual Studio 2005 - SP1 - VB.Net on WinXP SP2 I add a typed dataset to my solution and get the following errors : Error 1 sub 'ReadXmlSerializable' cannot be declared 'Overrides' because it...
21
by: Peter Bradley | last post by:
Hi all, This post is sort of tangentially related to my earlier posts on configuration files for DLLs. Does anyone know how to create typed DataSets using VS2005's new DataSet designer, but...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.