xml schema definition for the database tables

  • How can I create xml schema definitions for the current database table I have in my database?

    Thanks.

  • Please have a look at BOL (BooksOnLine, the SQL Server gelp system usually installed together with SQL Server, accessible via F1 from Management Studio). Search for the "CREATE XML SCHEMA COLLECTION".

    Is that what you're looking for?



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • I have around 60 tables in the database and need to create .xsd file for all the 60 database tables(create table script and indexes and relationships).

    Create table script for all these 60 tables should be in xml. Is there any script or tool to generate other than creating xml script manually for each and individual table.

    Thanks.

  • i usually add a blank xsd file to my project, then with server explorer, create a connection to the database.

    once that is there, you can drag and drop all 60 (or all 1000...no diff) tables to your xsd file; by default it also creates tableadapters, which i personally remove, but that's the fastest way....

    is that what youa re talking about?

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • In the visual studio I am not able to drag and drop the database objects into the blank xsd file from the server explorer. Any ideas?

    Thanks.

  • lets just cover all the bases;; you created a connection , correct? then you can expand the conenction to show the tables, multi select and drag and drop:

    you VS should look like this:

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • Hey,

    It worked.

    Thank you very much.

Viewing 7 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply