none
Create .mdf file from shared hosting database. RRS feed

  • Question

  • Greetings,

     

    Is there a way to create a database and subsequent tables from a typed dataset or an XML serialization?

     

    I have a client the has multiple developers working on the same project, me being one of them. One of the main issues (outside of very poor source control) is keeping the live database on shared hosting sync'ed with the database in our source repository.

     

    I'd like to create an app that runs localy though Visual Studio, hits the remote data by one or more page requests. (remote SQL connections are not allowed). Programatically grabs the database information and creates a local .mdf file.

     

    Step one for me is back to the 1st questtion. Is there a way to create a database and subsequent tables from a typed dataset or an XML serialization?

     

    Basically I'm trying to to BLinq in reverse.

     

    Lots of info on updating via datasets on the Web but I'm stuck here an would appreciation any help.

     

    Davidmal

    Sunday, November 9, 2008 6:17 PM

All replies

  • 1. There are, I believe, commercial products that will generate DDL from a dataset, but I am not aware of anything from Microsoft. If you really need this, I'd suggest writing a T4 template to do it - it'll be a few days of work, but shouldn't be particularly difficult given DataSet's straightforward translation to DDL statements. I suspect you could get a basic implementation done in one day. That said, I would think that perhaps doing the work of creating a SQL schema via SQL Server Management Studio and reverse engineering the DataSet might be more straightforward.

     

    2. Have you looked at Visual Studio Team System Database Edition? It is a commercial product, so might not be what you want, but it is designed to keep a database schema synchronized among a team and to provide fine-grained source control for a database schema, as well as a lot of additional tools for, for example, refactoring schemas.

     

    HTH,

      Noam

    Sunday, November 9, 2008 11:03 PM