473,387 Members | 1,597 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,387 software developers and data experts.

minOccurs in XML Schema for Datset

Hi

What effect does the presence of minOccurs attribute with columns
defining the tables for a dataset? I understand that, if it is set to
minOccurs=0, then the element does not have to appear in XML using the
XSD, but how does that effect the dataset? Does it allow a dataset to
be filled with a DataAdapter that does not provide that particular
column as output?

Many thanks, Lee
Nov 11 '05 #1
1 4362
Hi Lee,

If your XSD has minOccurs="1" then DBNull values are not allowed in the
column in the strongly-typed DataSet.

The xsd.exe tool generates code like this:
this.MyRequiredColumn.AllowDBNull = false;

The Set<columnname>Null() and Is<columnname>Null() methods are also not
generated.

--
Ross Donald
Rad Software
Get Intellisense when working with XSL in Visual Studio .NET
http://www.radsoftware.com.au/web/Co...ualStudio.aspx

"Lee Atkinson" <le**************@hotmail.com> wrote in message
news:ab**************************@posting.google.c om...
| Hi
|
| What effect does the presence of minOccurs attribute with columns
| defining the tables for a dataset? I understand that, if it is set to
| minOccurs=0, then the element does not have to appear in XML using the
| XSD, but how does that effect the dataset? Does it allow a dataset to
| be filled with a DataAdapter that does not provide that particular
| column as output?
|
| Many thanks, Lee
Nov 11 '05 #2

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

Similar topics

2
by: joewhitehair | last post by:
Using the XSD.exe tool, I created a number of classes from my XSD file. When I generate the WSDL for my web service, the schema does not have the proper Occurance constraints for the attributes. In...
0
by: Kurt | last post by:
Hi, (sorry if I'm cross posting - not quite sure where to put) I am basically trying to force the user of my web service to only send a valid dataset that is based on a schema I have created. ...
7
by: rbarschaw | last post by:
I have the following schema designed: <xs:complexType name="AzzFeature-BoxType" mixed="true"> <xs:choice minOccurs="1" maxOccurs="unbounded"> <xs:element ref="Sub-Head" minOccurs="1"...
2
by: NoNickname | last post by:
Right now I'm getting this in the wsdl: <s:element minOccurs="0" maxOccurs="1" name="Items" type="tns:ArrayOfMyClass" /> I would like to get minOccurs="1" for this webmethod: public...
0
by: Jeremy Chapman | last post by:
I'm building a class and I'm trying to use serialization attributes to set minOccurs=1 and nullable=false For example if I specify then my wsdl looks like: <s:element minOccurs="0"...
9
by: mstilli | last post by:
Hi, I am trying to use schema for server side validation using xerces to catch the validation errors. validating this XML: <Content4> <textarea13></textarea13>...
3
by: katis | last post by:
Hi all :) Is it posible in xsd to change only minOccurs value of element in complex type by extending this type? The problem I'm trying to solve is this: I have two complex types -...
6
by: bruce_phipps | last post by:
If I have an <element name="test" maxOccurs="unbounded"> with no minOccurs attribute specified does this mean I can have 0..unbounded occurences of <test>? Or 1..unbounded occurences of test? ...
0
by: Peter Larsen | last post by:
Is this really a valid schema design? <?xml version="1.0" encoding="UTF-8"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"> <xs:element name="root">...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.