Announcement

Collapse
No announcement yet.

Run a SQL Script during an install?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Run a SQL Script during an install?

    I need to alter an MS Access database table and insert a few records. Is there a way to do this during the install procedure? I'm having a hard time even finding a command-line utility.

    Thanks in advance!!
    Dave

  • #2
    Re: Run a SQL Script during an install?

    No, I'm sorry, there's no feature in Setup Factory that will enable database manipulation, so yes, it would need to be done through some sort of third party application, or maybe there is something in Windows that you can call to from Setup Factory to accomplish this, however I'm not aware of any.

    Comment


    • #3
      Re: Run a SQL Script during an install?

      If your database is on the web it's pretty easy to create a web script to do what you need, i.e. using PHP. If your database is local there are a few different ways, I'm no access guru but I've seen it done. One way I would try is using PHP-GTK to create an executable, but then I'm kooky that way. In reality using Visual Basic is probably the best and easiest way to do local database stuff... Here's a link which may or may not have any value to you, wish I could offer more:

      http://www.phpbuilder.com/columns/siddarth20000228.php3

      This looks pretty cool too:

      http://www.microsoft.com/india/mspre.../book18010.htm


      Corey Milner
      Creative Director, Indigo Rose Software

      Comment


      • #4
        Re: Run a SQL Script during an install?

        Here's an interesting idea of using VBscript to access the local database via ADO.

        Win32 Scripting Site - http://cwashington.netreach.net/depo...tType=vbscript

        This is the same way you would do it in a ASP web page, so you should be able to find a lot of example code at sites that focus on ASP page writing.

        Comment


        • #5
          Re: Run a SQL Script during an install?

          Your best bet would be to write a VB or VC++ app that does it through ADO, Jet or ODBC (or some combination). It really depends on what you know of the end user's system. If you know that they have ADO installed, then that would be relatively easy.

          There may be other solutions such as writing a stored SQL procedure that your app looks for and runs next time it starts, etc. It really depends on your situation. If you provide more details about who this setup is being deployed to and what exactly you need the database access at install time for I will try to think of other solutions as well.

          Comment


          • #6
            Re: Run a SQL Script during an install?

            I have been using a VB exe to accomplish the task of creating database tables upon installation. However recently i have seen an Installer that does database installation(WISE installation wizard).

            Comment

            Working...
            X