VS2005. I'm running a stored procedure and am stuffing the output into
a dataset.
I want the dataset to be strongly-typed, but can't seem to get quite
what I want out.
Performing a "Fill" on a generic dataset, I can get the schema of the
data being returned. A snippet appears below:
<xs:element name="Table2">
<xs:complexType>
<xs:sequence>
<xs:element name="PRODUCT_GROUP" msprop:OraDbType="126"
type="xs:string" minOccurs="0" />
<xs:element name="PARENT_PRODUCT_GROUP"
msprop:OraDbType="126" type="xs:string" minOccurs="0" />
<xs:element name="PRODUCT_GROUP_DESCR"
msprop:OraDbType="126" type="xs:string" minOccurs="0" />
<xs:element name="PRODUCT_GROUP_LEVEL"
msprop:OraDbType="111" type="xs:short" minOccurs="0" />
</xs:sequence>
</xs:complexType>
</xs:element>
I can quite happily submit this to xsd.exe and generate the strongly-
typed dataset "as is".
However, the snippet above refers to the data in "database-speak" (for
example, Table2, PRODUCT_GROUP etc.) What I'd like to do is to put
some kind of transform in there such that instead of "Table2", my
strongly-typed element name could be "ProductData", and instead of
"PRODUCT_GROUP" my dataset could support a property "productGroup".
Something like that. After all, when you look at the autogenerated
code, it doesn't appear to be a million miles away from what I'm
after.
Anyone know if it is possible? A nifty attribute tagged onto my
xs:element tags, say?
TIA,
Pete