write progamming connecting QTP to database sql? this is
question asked by interview? pls any answer this?

Answer Posted / raj

objConnect=CreateObject("ADODB.Connection")
objRecordSet=CreateObject("ADODB.RecordSet")

strConnection="Driver=SQL
Server","Server=LocalSQLServerName","Database=master","UID=s
a","PWD=sa"

objConnect.OPEN strConnection

strQuery= "select * from master"

objRecordset.Open strquery, objConnect

Thanks,
Raj

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Discuss quicktest professional (qtp) environment?

570


What does it mean when a check point is in red color? What do you do?

561


what is profile tool?

1599


How to do the scripting. Are there any inbuilt functions in QTP? What is the difference between them? How to handle script issues?

567


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

1510






What are the different properties of an web object

1422


Hi frnds, does anybody know if there is anything called "thin point" or something in qtp? thanks in advance.

2858


What is the use of defining a newobject in the object repository "Define New TestOject". How to use this further. If we define new testobject, how can it recognizes the objects properties of any application.

1495


What are the differences between quicktest professional and winrunner?

536


How to execute the WR Script through QTP? I have WinRunner script with initialization script, common scripts, GUI AND functions. I connected WR through QTP with "call to WinRunner" option but I am getting problem after connecting to WinRunner i.e. showing "Do you want to quit now" with 'yes' and 'No' message box

1824


how to i add the values using the check points property?( i.e valid data(for valid data it's giving the footer message:value is added) and for invalid data: special chars, spaces,Duplicates and null values (in my page when ever we enter special chars, spaces and null values, it's giving the proper warning message and for Duplicates it's giving the footer message:"value already exists)?

1412


Subj: realtime example of Database check point, Can any one please detail on how the Database check point is utilized/implemented in a real time project. I already know how to make one by creating DSN/ODBC and writing the required query manually and other steps...I wanted the actual concept of implementation...couple of live examples will be highly appreciated. Thank you in advance

1760


please give me the code for doing retesting of gmail login page using functions so the function has to give the value

1540


What is the architecture of your project? Can any one answer for this question plz........

1406


When to use descriptive programming?

584