Use a SqlDataAdapter to get to the table and then call FillSchema() to fill
a DataSet with the metadata. Then call WriteXmlSchema() or GetXmlSchema()
to access the data as a schema document. See FillSchema() in the SDK for
more details.
Also note that if you have VS.NET (not sure if all versions have this
functionality) you can use the Server Explorer to drag a table onto the
design surface. An XSD schema will automatically be generated for you which
can then be used for a typed DataSet if needed.
HTH,
Dan Wahlin
Wahlin Consulting
Microsoft MVP - ASP.NET and XML Web Services
http://www.xmlforasp.net
"Rajesh Tiwari" <ra****@nuis.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
hi group
plz tell
how to generate XSD of a table in sql server.
thanks
--
Rajesh Tiwari
S/W Engineer
Digital Offshore Solutions(www.dospl.com)
Gurgaon,HR