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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Shell command and isql problem

Status
Not open for further replies.

tjb2

Programmer
Jul 24, 2003
17
US
I have inherited the following bit of code:

sBuf = "isql -U sa -P iamthedba -S ntserv-sql1 -d ryans -Q "exec asp_3ManWithOutPREditData '5/31/2006'" -o \\ntserv_pdc\common\sharedat\performancegriddocs\txtfiles\threemanagerbonus.txt"

Shell sBuf

When the app gets to this point it errors with file not found. However, when i run the same isql command in the command prompt the entire thing runs without a problem. I only get the error when running in the VB6 project environment.

Please help...Someone...Anyone...

Thanks,

TJ [dazed]
 
Try putting that in to a .bat file and then shell out to the bat file.

Contents of bat file:

[tt][blue]isql -U sa -P iamthedba -S ntserv-sql1 -d ryans -Q "exec asp_3ManWithOutPREditData '5/31/2006'" -o \\ntserv_pdc\common\sharedat\performancegriddocs\txtfiles\threemanagerbonus.txt[/blue][/tt]

Then, from VB:

Shell "TheBatchFile.Bat"

Also...

Is that really your SA password. Since you posted this in a public forum, it's probably a good time to change the password. [wink]

-George

Strong and bitter words indicate a weak cause. - Fortune cookie wisdom
 
Thanks for the tip. No that is not my password...Just tryin to be cute! Anyway i will try that.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top