Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Creating SQL table with installer.

Creating SQL table with installer.

Scheduled Pinned Locked Moved C#
csharpdatabasequestiondotnet
5 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • I Offline
    I Offline
    IrishSonic
    wrote on last edited by
    #1

    Hiya I have created an installer for my c# and ado.net app, but want to create a new sql table when the installer runs, if the sql table in the database does not exist. I also need to add assemblies to the gac when the installer runs. How do I do this?? Thanks.

    N C 2 Replies Last reply
    0
    • I IrishSonic

      Hiya I have created an installer for my c# and ado.net app, but want to create a new sql table when the installer runs, if the sql table in the database does not exist. I also need to add assemblies to the gac when the installer runs. How do I do this?? Thanks.

      N Offline
      N Offline
      Not Active
      wrote on last edited by
      #2

      [Streamline Your Database Setup Process with a Custom Installer](http://Streamline Your Database Setup Process with a Custom Installer)[^]

      1 Reply Last reply
      0
      • I IrishSonic

        Hiya I have created an installer for my c# and ado.net app, but want to create a new sql table when the installer runs, if the sql table in the database does not exist. I also need to add assemblies to the gac when the installer runs. How do I do this?? Thanks.

        C Offline
        C Offline
        Christian Graus
        wrote on last edited by
        #3

        I wrote my own installer, which just calls the various steps of installation in turn ( install .NET1.1, DirectX9, MSDE, etc. ) and one of those steps is a little app I wrote that uses an XML config file to specify a connection string and a sequence of .SQL files. The files it points to are the ones I used when writing the database, and the app runs them in turn, and displays any errors, and the SQL it is calling as it goes. This sets up my database, and then I run the installer for my actual applications. Christian I have drunk the cool-aid and found it wan and bitter. - Chris Maunder

        I 1 Reply Last reply
        0
        • C Christian Graus

          I wrote my own installer, which just calls the various steps of installation in turn ( install .NET1.1, DirectX9, MSDE, etc. ) and one of those steps is a little app I wrote that uses an XML config file to specify a connection string and a sequence of .SQL files. The files it points to are the ones I used when writing the database, and the app runs them in turn, and displays any errors, and the SQL it is calling as it goes. This sets up my database, and then I run the installer for my actual applications. Christian I have drunk the cool-aid and found it wan and bitter. - Chris Maunder

          I Offline
          I Offline
          IrishSonic
          wrote on last edited by
          #4

          Hi I now have my sql script which generates the database and tables. I have my setup project and added a custom action for the script. But the script will not run when being installed.. Help!!

          C 1 Reply Last reply
          0
          • I IrishSonic

            Hi I now have my sql script which generates the database and tables. I have my setup project and added a custom action for the script. But the script will not run when being installed.. Help!!

            C Offline
            C Offline
            Christian Graus
            wrote on last edited by
            #5

            I wrote my OWN installer, and run the script myself, that is, I also wrote the C# code to run the script. If you're not running your own code, I have no idea how to get an installer to run a SQL script, but I doubt just providing the script will do it. Christian I have drunk the cool-aid and found it wan and bitter. - Chris Maunder

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups