Executing a SQL script via VB

  • Hi!

    At the moment, I'm creating a script runner with VB6 and SQL-DMO that will run all SQL scripts in a folder.

    Is there anyway I can execute a script file without opening the script file itself?

    Been trying to find a class method in SQL-DMO that will do the bloody job for me....

    Please help.

  • I know of no way as you have to open the file to read the contents.

  • Would the isql/osql dos commands do this for you? I have never used them but BOL suggests that you can execute a query file (script file?) from a dos prompt.

    Jeremy

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply