The online community for software testing & quality assurance professionals
 
 
Calendar   Today's Topics
Sponsors:
Lost Password?

Home
BetaSoft
Blogs
Jobs
Training
News
Links
Downloads



Testing Tools >> HP/Mercury QuickTest Pro

Pages: 1
shruti111
Member


Reged: 01/20/08
Posts: 45
Executing .SQl files from QTP
      #584466 - 08/06/09 11:53 PM

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


Post Extras: Print Post   Remind Me!   Notify Moderator  
rrromano
Member


Reged: 07/09/07
Posts: 30
Re: Executing .SQl files from QTP [Re: shruti111]
      #584487 - 08/07/09 01:58 AM

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.


Post Extras: Print Post   Remind Me!   Notify Moderator  
rscholz660
Super Member


Reged: 12/05/06
Posts: 1482
Loc: Germany, Dresden
Re: Executing .SQl files from QTP [Re: shruti111]
      #584491 - 08/07/09 02:11 AM

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


Post Extras: Print Post   Remind Me!   Notify Moderator  
shruti111
Member


Reged: 01/20/08
Posts: 45
Re: Executing .SQl files from QTP [Re: rscholz660]
      #584493 - 08/07/09 02:17 AM

Thanks this worked!

-Shruti


Post Extras: Print Post   Remind Me!   Notify Moderator  
Pages: 1



Extra information
3 registered and 41 anonymous users are browsing this forum.

Moderator:  IanFraser, thorwath, TReddy, AJ, Tarun Lalwani, mwsrosso 

Print Topic

Forum Permissions
      You cannot start new topics
      You cannot reply to topics
      HTML is disabled
      UBBCode is enabled

Rating:
Topic views: 571

Rate this topic

Jump to

Contact Us | Privacy statement SQAForums

Powered by UBB.threads™ 6.5.5