How to connect to the Database from QTP?
Answer Posted / sandipgami84
Dim ObjCon, ObjResult, ObjSQL
set ObjCon=Createobject("ADODB.Connection")
ObjCon.ConnectionString("DSN= ,UID= ,PWD= ")
ObjSQL="SELECT * FROM Emp"
ObjCon.Open()
ObjResult=ObjCon.Execute(ObjSQL)
ObjCon.Close()
ObjResult=Nothing
whtever ur data stored in ObjResult variable
Is This Answer Correct ? | 31 Yes | 13 No |
Post New Answer View All Answers
How to Open FireFox using descriptive programing? If my question is not clear, i will give an Example To Open Internet Explorer, We use Set IE = CreateObject(InternetExplorer.Application) IE.Navigate "www.yahoo.com In the same i need to open yahoo.com in firefox. Can any one tell me what is the server name of firefox to create an object
Why bpt?
RECENTLY I PLACED IN QTP..HOW TO IMPROVE VB SCRIPTS KNOWLEDGE? IAM STRUGGING TO WRITE THE AUTOMATION SCRIPTS? ANY BODY TELL HOW TO IMPROVE QTP SCRIPT SKILLS?
what difference between runtime object and text object and what property they have. whether they have same properties or different properties.
Hi friends I need to know about jubula automation tool. Is anybody know in bangalore where jubula tanning class is going on do let me know. Its urgent for me to learn that tool please help.
can u explain relative path architecture framework in qtp?
Does QTP10 supports Windows 7OS +IE 9 combination? Which is the preffered combination ,Plz let me know?
Dear sir, i want to perform a QTP automated testing for mechancial engineering software like msc adams, msc nastran this softwares will help for mechanical engineering design analysis>> i know oad runner win runner, test director, QTp>> but i dont know how to use for automation
When Recovery scenario actually starts while testing the application?
How to capture dynamic values in load runner and how Each of the captured values are to be written to a text file (c:\temp\LoadRunner1.txt)
What is debugging? How you debug your script?
I opened gmail login into gmail and i have to save (Pass or move) all the mail into notepad please give me code Thanks of all
Pls can anyone give me the entire code for the Keyword driven framework with respect to he Flight Reservation Window in detail with explanation. Pls explain in detail stepwise. Thanks a lot. Pls very urgent?.
Can QTP be used for GUI testing ?, We are using Java with MySQL and Operating system is Linux. We are NOT using the web.
Why qtp always start action1 and does not start action?