shruti111
Member
Reged: 01/20/08
Posts: 45
|
|
Hi,
I need to run a .sql file from QTP. When i use this command, QTP just opens a .sql file in a note pad but doesnot execute it.
SystemUtil.Run D:\abc.sql
Would be great if anybody can help me in this.
Regards, Shruti
|
rrromano
Member
Reged: 07/09/07
Posts: 30
|
|
It won't. Is the .sql file format executable in Windows? No. Then, how do you expect it to be runned from QTP. Look for topics about DB connection object, you need to create it from QTP (you should have DB client driver installed locally) and then run query.
|
rscholz660
Super Member
Reged: 12/05/06
Posts: 1482
Loc: Germany, Dresden
|
|
create a second file like "run.bat" with the following content (example is for oracle...)
sqlplus /nolog @%Path%\abc.sql
then execute the batch file "run.bat"
or try SystemUtil.Run "sqlplus","@%Path%\abc.sql"
-------------------- de omnibus dubitandum
For all Questions: Please be sure to take a look at the QTP Manual before posting any Questions, thanks for doing this
|
shruti111
Member
Reged: 01/20/08
Posts: 45
|
|
Thanks this worked!
-Shruti
|