How to install database using SQL script from .net deployment project in VS

Discussion in 'ASP .Net' started by Nitin Singh, Jun 1, 2005.

  1. Nitin Singh

    Nitin Singh Guest

    We are using a VS Deployment Project to distribute an ASP.NET app.
    Presently we take script files to client and run them in Query Analyser of
    SQL Server. But we want to automate running of SQL scripts along with the
    application installer.

    We tried using a project which reads script files and run them by passing it
    to SQL Client's Command object, but this accepts only ONE entity's script at
    a time.

    So in order to create about 100 tables and 500 sp, we require writing 600
    calls to the function which sends the script to command object.

    If we create the script for all objects in a single file, the "GO" keyword
    throws and error.

    Please help me.


    Nitin Singh
    ASP.NET Developer

    India
    Nitin Singh, Jun 1, 2005
    #1
    1. Advertising

  2. "Nitin Singh" <> wrote in message
    news:...
    > We are using a VS Deployment Project to distribute an ASP.NET app.
    > Presently we take script files to client and run them in Query Analyser of
    > SQL Server. But we want to automate running of SQL scripts along with the
    > application installer.
    >
    > We tried using a project which reads script files and run them by passing
    > it
    > to SQL Client's Command object, but this accepts only ONE entity's script
    > at
    > a time.
    >
    > So in order to create about 100 tables and 500 sp, we require writing 600
    > calls to the function which sends the script to command object.
    >
    > If we create the script for all objects in a single file, the "GO" keyword
    > throws and error.
    >
    > Please help me.
    >
    >
    > Nitin Singh
    > ASP.NET Developer
    >
    > India
    >
    >

    Check out this URL
    http://www.codeguru.com/Csharp/.NET/net_security/encryption/article.php/c9601/
    Jamie Bissett, Jun 2, 2005
    #2
    1. Advertising

  3. Nitin Singh

    Nitin Singh Guest

    Thanks

    the problem has been solved, by using the "regex " in the ExecuteSQL
    function.

    Nitin Singh
    Nitin Singh, Jun 3, 2005
    #3
  4. Nitin Singh

    prakashb

    Joined:
    Mar 21, 2007
    Messages:
    1
    Can you send me the code so that i can create for my project
    prakashb, Mar 21, 2007
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.

Share This Page