views:

67

answers:

1

Hi everyone,

I want to be able to create the XSD file for my typed dataset without using the visual studio dataset designer. Is there a way to do this using for instance a command-line tool? There is some magic happening when a table is dragged from the server explorer to the design surface, but where does that magic come from?

To add some flavour to the mix, I am using DB2 LUW 9.1, but I am guessing that the process is similar using other database vendors.

Once I have the XSD I can use XSD.exe to create my .CS class, no problem.

Thanks for any help or suggestion!

/Per

+1  A: 

If you have data in XML format that corresponds to your database tables, XSD.exe can be used to infer a schema from them directly.

Otherwise, if you just have your database and you want to generate both the classes and the XSD file from it, you can maybe do something like this: HOW TO: Write an XSD Schema From a Database using a DataSet.

womp
Thanks for that suggestion, even if id didn't answer my question (I see now that i didn't ask the right one) it pointed me into the right direction. I found the difference between tableadapters and dataadapters. I am on my way now...Thanks!
Per Åkerberg