Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Executing a file from BTEQWin

Status
Not open for further replies.

Liam1

Programmer
Nov 7, 2002
43
GB
Hello,

I am trying to use a Microsoft Access module to execute a query in BTEQWin.
I can start BTEQWin fine, but how do I send it something like
.run C:\SQL.txt

Thanks in advance,

Liam1
 
tdatgod,

Cheers,

I am trying to use the VBA code
varReturn = Shell("C:\Program Files\NCR\Teradata Client\bin\bteqwin.exe .run C:\BTEQWin\SQL\test1.txt", vbNormalFocus)

but is does not work, it just opens a new window called "test1"

Any ideas?

Thanks,

Liam1
 
What does the query do? What are you trying to do?

If it is a simple select, update, insert, or create table statement you could most likely do it easier with a pass through in access. (If you want I can post the code on how to create & update the query).

If not another work around would be to create a batch file, then call the batch file, which in turn would execute the script.

For example
Code:
Open "C:\BTEQWin\SQL\test1.bat" for write as #1

print #1, &quot;C:\Program Files\NCR\Teradata Client\bin\bteqwin.exe <C:\BTEQWin\SQL\test1.txt >C:\BTEQWin\SQL\test1.log&quot;

Close #1

varReturn = Shell(&quot;C:\BTEQWin\SQL\test1.bat&quot;, vbNormalFocus)

 
BTW, you should'n use BTEQWIN (it's a GUI), use BTEQ instead.

Dieter
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top