Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How to connect to data base?

Answer Posted / ravi

QTP supports interaction with Database using ADODB.

Set con = createobject("ADODB.Connection")
Set rs = createobject("ADODB.Recordset")

'Create DSN(DataSourceName) for your database and specify
the DSN here
'You can also establish connection using Provider name

con.open "DSN=MyDsn;UID=ravi;PWD=sample123"

con.execute "Insert into emp values(2500, 'Ravi')"

'Retrieve data from database
rs.open "select * from emp", con
while not rs.eof
msgbox "ID = " & rs(0) & " Name = " & rs(1)
rs.movenext
wend

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the different properties of an web object

1893


Where is the Bitmap checkpoint information stored?

2293


how to test use the quality control .how to verify the image verification

3086


How do you capture tooltip using QTP?

1064


Mention the different actions types of qtp.

1002


what is profile tool?

2209


What is the difference between a Function and Procedure in QTP?

1177


Explain sub procedure of vbscript.

1030


How is UFT 11.5 version different from UFT 12.0?

1058


breef description of batch testing ?

2105


How to find the length of the string in qtp?

1021


To which environments does quicktest professional (qtp) supports?

1001


How to find the difference between 2 dates in qtp?

1034


what are the frame work models of qtp?which frame work you follow in your company?and explain it process?

2541


Hi ,Can any one pleas explain how to test splash objects using QTP?

2346