By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,955 Members | 1,793 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,955 IT Pros & Developers. It's quick & easy.

use of xsd.exe

P: n/a
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

Apr 27 '07 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.