Announcement

Collapse
No announcement yet.

I've been given a SQL query to run on my database but I don't have MS Access. How ...

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

    I've been given a SQL query to run on my database but I don't have MS Access. How ...

    I've been given a SQL query to run on my database but I don't have MS Access. How can I apply it?

    You can run a SQL query on the ActinicCatalog.mdb file without MS Access by doing the following:

    * create a blank text document
    * paste the following into the file:

    'my shop database is located at:
    mydb = "C:\Documents and Settings\All Users\Documents\Actinic v9\Sites\site1\ActinicCatalog.mdb"

    Set OBJdbConnection = CreateObject("ADODB.Connection")
    OBJdbConnection.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & mydb
    SQLQuery = " "
    Set Result = OBJdbConnection.Execute(SQLQuery)
    OBJdbConnection.Close


    msgbox("done")

    * change the 'mydb' value to the location of the ActinicCatalog.mdb file for the correct site
    * place the SQL that you have been given in the 'SQLQuery' line between the " and " (any line breaks must be removed)
    * close and save the file
    * rename the file to something like 'SQLUpdate.vbs' (the icon should look like )
    * ensure that SellerDeck is closed and ALWAYS back up your database before you run the file
    * double-click on the file to run it
    * you will get a 'done' message when it is finished
    * you can then re-open SellerDeck.


    With thanks to Gabriel Crowe of Interact Studio for providing this solution.
Working...
X