Corno,
For what it's worth, I tried doing this in Visual Studio 2005 (that's all I
have installed - sorry) .. and this problem did not happen. Here is the
dataset I got. .. and as you look at the very bottom - the nested property
is set to true.
- Sahil Malik
http://dotnetjunkies.com/weblog/sahilmalik
<?xml version="1.0" encoding="utf-8" ?>
- <DataSet1 xmlns="http://tempuri.org/">
- <xs:schema id="DataSet1" targetNamespace ="http://tempuri.org/DataSet1.xsd"
xmlns:mstns="ht tp://tempuri.org/DataSet1.xsd"
xmlns="http://tempuri.org/DataSet1.xsd"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:msdata="u rn:schemas-microsoft-com:xml-msdata"
xmlns:msprop="u rn:schemas-microsoft-com:xml-msprop"
attributeFormDe fault="qualifie d" elementFormDefa ult="qualified" >
- <xs:element name="DataSet1" msdata:IsDataSe t="true"
msprop:User_Dat aSetName="DataS et1"
msprop:DSGenera tor_DataSetName ="DataSet1">
- <xs:complexType >
- <xs:choice minOccurs="0" maxOccurs="unbo unded">
- <xs:element name="DataTable 2" msdata:SuspendV alidation="Fals e"
msprop:User_Tab leName="DataTab le2"
msprop:Generato r_SuspendValida tionPropName="S uspendValidatio n"
msprop:Generato r_TableClassNam e="DataTable2Da taTable"
msprop:Generato r_SuspendValida tionVarName="m_ suspendValidati on"
msprop:Generato r_RowClassName= "DataTable2 Row"
msprop:Generato r_RowEvArgName= "DataTable2RowC hangeEvent"
msprop:Generato r_RowEvHandlerN ame="DataTable2 RowChangeEventH andler"
msprop:Generato r_TablePropName ="DataTable2 "
msprop:Generato r_TableVarName= "tableDataTable 2">
- <xs:complexType >
- <xs:sequence>
<xs:element name="Column1"
msprop:Generato r_DelegateName= "Column1ChangeE ventHandler"
msprop:Generato r_ChangingEvent Name="Column1Ch anging"
msprop:Generato r_ColumnVarName InTable="column Column1"
msprop:Generato r_EventArgName= "Column1ChangeE ventArg"
msprop:User_Col umnName="Column 1"
msprop:Generato r_ColumnPropNam eInRow="Column1 "
msprop:Generato r_ChangedEventN ame="Column1Cha nged"
msprop:Generato r_ColumnPropNam eInTable="Colum n1Column" type="xs:string "
minOccurs="0" />
<xs:element name="Column2"
msprop:Generato r_DelegateName= "Column2ChangeE ventHandler"
msprop:Generato r_ChangingEvent Name="Column2Ch anging"
msprop:Generato r_ColumnVarName InTable="column Column2"
msprop:Generato r_EventArgName= "Column2ChangeE ventArg"
msprop:User_Col umnName="Column 2"
msprop:Generato r_ColumnPropNam eInRow="Column2 "
msprop:Generato r_ChangedEventN ame="Column2Cha nged"
msprop:Generato r_ColumnPropNam eInTable="Colum n2Column" type="xs:string "
minOccurs="0" />
- <xs:element name="DataTable 1" msdata:SuspendV alidation="Fals e"
msprop:User_Tab leName="DataTab le1"
msprop:Generato r_SuspendValida tionPropName="S uspendValidatio n"
msprop:Generato r_TableClassNam e="DataTable1Da taTable"
msprop:Generato r_SuspendValida tionVarName="m_ suspendValidati on"
msprop:Generato r_RowClassName= "DataTable1 Row"
msprop:Generato r_RowEvArgName= "DataTable1RowC hangeEvent"
msprop:Generato r_RowEvHandlerN ame="DataTable1 RowChangeEventH andler"
msprop:Generato r_TablePropName ="DataTable1 "
msprop:Generato r_TableVarName= "tableDataTable 1" minOccurs="0"
maxOccurs="unbo unded">
- <xs:complexType >
- <xs:sequence>
<xs:element name="Column1"
msprop:Generato r_DelegateName= "Column1ChangeE ventHandler"
msprop:Generato r_ChangingEvent Name="Column1Ch anging"
msprop:Generato r_ColumnVarName InTable="column Column1"
msprop:Generato r_EventArgName= "Column1ChangeE ventArg"
msprop:User_Col umnName="Column 1"
msprop:Generato r_ColumnPropNam eInRow="Column1 "
msprop:Generato r_ChangedEventN ame="Column1Cha nged"
msprop:Generato r_ColumnPropNam eInTable="Colum n1Column" type="xs:string "
minOccurs="0" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
- <xs:unique name="Constrain t1">
<xs:selector xpath=".//mstns:DataTable 2" />
<xs:field xpath="mstns:Co lumn1" />
</xs:unique>
- <xs:keyref name="FK_DataTa ble2_DataTable1 " refer="Constrai nt1"
msdata:IsNested ="true">
<xs:selector xpath=".//mstns:DataTable 1" />
<xs:field xpath="mstns:Co lumn1" />
</xs:keyref>
</xs:element>
</xs:schema>
<diffgr:diffgra m xmlns:msdata="u rn:schemas-microsoft-com:xml-msdata"
xmlns:diffgr="u rn:schemas-microsoft-com:xml-diffgram-v1" />
</DataSet1>
- Sahil Malik
http://dotnetjunkies.com/weblog/sahilmalik
"Corno" <Corno@dds%FAKE %.nl> wrote in message
news:uy******** ******@TK2MSFTN GP09.phx.gbl...
Hi all,
If I want to provide a typed dataset from a webservice and if that dataset
has relations that are nested (isNested=True) , then the relations(keyre fs)
are not available in the XSD that is offered. If I set IsNested to false
or default, then it is included in the XSD.
Is this a bug or by design?
Corno