M
mklapp
Hello,
I have a Web service retrieving data from SQL Server
2000 and returning rows which contain a DBNull in a
field. I have modified the XML Schema according to an
MSDN article, a KB article and a fellow poster.
Still I am crashing.
I created a test app, according to a KB article
designed to demonstrate this capability. Exploring that
project I discovered the Class routines behind the
dataset. Thes routines were addressing a column named
_Region whereas the Customers table for the Northwind
database only has a column named Region (without the
leading underscore).
Must the name of the 'nullable' column being tested
have a leading underscore?
My schema is included below for reference.
Thank you,
mklapp
<?xml version="1.0" standalone="yes" ?>
<xs:schema id="MASpedDataSet" xmlns:codegen="urn:schemas-
microsoft-com:xml-msprop"
targetNamespace="http://www.tempuri.org/MASpedDataSet.xsd"
attributeFormDefault="qualified"
elementFormDefault="qualified"
xmlns:mstns="http://www.tempuri.org/MASpedDataSet.
xsd" xmlns="http://www.tempuri.org/MASpedDataSet.xsd"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xs:element name="MASpedDataSet"
msdata:IsDataSet="true">
<xs:complexType>
<xs:choice maxOccurs="unbounded">
<xs:element name="MASped">
<xs:complexType>
<xs:sequence>
<xs:element name="StudentId" codegen:nullValue=""
type="xs:string" />
<xs:element name="MASpedId" codegen:nullValue="0"
type="xs:int" />
<xs:element name="MANumber" codegen:nullValue=""
type="xs:string" />
<xs:element name="MAStatus" codegen:nullValue=""
type="xs:string" minOccurs="0" />
<xs:element name="MCHIP" codegen:nullValue=""
type="xs:string" minOccurs="0" />
<xs:element name="PrimeIns" codegen:nullValue="0"
type="xs:int" minOccurs="0" />
<xs:element name="ServicesCovered"
codegen:nullValue="" type="xs:string" minOccurs="0" />
<xs:element name="SecondaryIns"
codegen:nullValue="" type="xs:string" minOccurs="0" />
<xs:element name="MACDocPhone"
codegen:nullValue="" type="xs:string" minOccurs="0" />
<xs:element name="MACDocNumber"
codegen:nullValue="" type="xs:string" minOccurs="0" />
<xs:element name="MACDocApprove"
codegen:nullValue="" type="xs:string" minOccurs="0" />
<xs:element name="OtherFirstName"
codegen:nullValue="" type="xs:string" minOccurs="0" />
<xs:element name="OtherLastName"
codegen:nullValue="" type="xs:string" minOccurs="0" />
<xs:element name="OutOfCounty"
codegen:nullValue="" type="xs:string" minOccurs="0" />
<xs:element name="DateStamp" type="xs:dateTime"
minOccurs="0" />
<xs:element name="BusRider" codegen:nullValue="N"
type="xs:string" minOccurs="0" />
<xs:element name="UserId" codegen:nullValue=""
type="xs:string" minOccurs="0" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
<xs:unique name="Constraint1"
msdatarimaryKey="true">
<xs:selector
xpath=".//mstns:MASped" />
<xs:field
xpath="mstns:StudentId" />
</xs:unique>
</xs:element>
</xs:schema>
I have a Web service retrieving data from SQL Server
2000 and returning rows which contain a DBNull in a
field. I have modified the XML Schema according to an
MSDN article, a KB article and a fellow poster.
Still I am crashing.
I created a test app, according to a KB article
designed to demonstrate this capability. Exploring that
project I discovered the Class routines behind the
dataset. Thes routines were addressing a column named
_Region whereas the Customers table for the Northwind
database only has a column named Region (without the
leading underscore).
Must the name of the 'nullable' column being tested
have a leading underscore?
My schema is included below for reference.
Thank you,
mklapp
<?xml version="1.0" standalone="yes" ?>
<xs:schema id="MASpedDataSet" xmlns:codegen="urn:schemas-
microsoft-com:xml-msprop"
targetNamespace="http://www.tempuri.org/MASpedDataSet.xsd"
attributeFormDefault="qualified"
elementFormDefault="qualified"
xmlns:mstns="http://www.tempuri.org/MASpedDataSet.
xsd" xmlns="http://www.tempuri.org/MASpedDataSet.xsd"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xs:element name="MASpedDataSet"
msdata:IsDataSet="true">
<xs:complexType>
<xs:choice maxOccurs="unbounded">
<xs:element name="MASped">
<xs:complexType>
<xs:sequence>
<xs:element name="StudentId" codegen:nullValue=""
type="xs:string" />
<xs:element name="MASpedId" codegen:nullValue="0"
type="xs:int" />
<xs:element name="MANumber" codegen:nullValue=""
type="xs:string" />
<xs:element name="MAStatus" codegen:nullValue=""
type="xs:string" minOccurs="0" />
<xs:element name="MCHIP" codegen:nullValue=""
type="xs:string" minOccurs="0" />
<xs:element name="PrimeIns" codegen:nullValue="0"
type="xs:int" minOccurs="0" />
<xs:element name="ServicesCovered"
codegen:nullValue="" type="xs:string" minOccurs="0" />
<xs:element name="SecondaryIns"
codegen:nullValue="" type="xs:string" minOccurs="0" />
<xs:element name="MACDocPhone"
codegen:nullValue="" type="xs:string" minOccurs="0" />
<xs:element name="MACDocNumber"
codegen:nullValue="" type="xs:string" minOccurs="0" />
<xs:element name="MACDocApprove"
codegen:nullValue="" type="xs:string" minOccurs="0" />
<xs:element name="OtherFirstName"
codegen:nullValue="" type="xs:string" minOccurs="0" />
<xs:element name="OtherLastName"
codegen:nullValue="" type="xs:string" minOccurs="0" />
<xs:element name="OutOfCounty"
codegen:nullValue="" type="xs:string" minOccurs="0" />
<xs:element name="DateStamp" type="xs:dateTime"
minOccurs="0" />
<xs:element name="BusRider" codegen:nullValue="N"
type="xs:string" minOccurs="0" />
<xs:element name="UserId" codegen:nullValue=""
type="xs:string" minOccurs="0" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
<xs:unique name="Constraint1"
msdatarimaryKey="true">
<xs:selector
xpath=".//mstns:MASped" />
<xs:field
xpath="mstns:StudentId" />
</xs:unique>
</xs:element>
</xs:schema>