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

Hi All, How to get repeated word in string . Thanks Balaji

1300


How many ways we can parameterize data in quicktest professional?

971


give me the code to save all messages of inbox of gmail into a folder and notepad

2048


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

3034


What is Associate Repository in QTP 9.2 ?

968


Where you are storing your script?

1046


How does qtp identify gui object?

952


What are the features of quick test pro(qtp)?

945


What is the keyword view and expert view in qtp?

893


What is the use of an object spy tool in qtp?

949


can i compare two databases using QTP ?

2354


What are the challenges u faced in testing with crm domain? How u overcome with?

1893


What are the Disadvantages of shared object repository?

1064


In QTP can we feed the out of one browser(internet explorer) as an input to the another browser(mozilla firefox)? If yes explain how to do it with an example.

2050


What is throw Object?

2048