Open SQL Script in Query Analyzer with Button Click

G

Guest

I want to open a .sql script in Query Analyzer from a button on an access
form. I have Query Analyzer set up as the defaul editor for .sql files, If I
double-click a .sql script in a folder it opens automatically in Query
Analyzer. I want to duplicate this action from a button on an access form.

Query Analyzer
C:\Program Files\Microsoft SQL Server\80\Tools\Binn\isqlw.exe

Script Location
' N:\QA SQL\MyScript.sql


--
Billy Rogers

Dallas,TX

Currently Using SQL Server 2000, Office 2000 and Office 2003
 
G

Guest

I'm not sure this would work but I would try

Dim RetVal, Dim

RetVal = Shell("N:\QA SQL\MyScript.sql", vbNormalFocus)


If that doesn't work, you may need to find if there is a command line switch
for isqlw.exe for opening a file that let's you make something like this

RetVal = Shell("C:\Program Files\Microsoft SQL
Server\80\Tools\Binn\isqlw.exe /N:\QA SQL\MyScript.sql", vbNormalFocus)

HTH
Bryan..
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top