GeekInterview.com
Series: Subject: Topic:
Question: 1483 of 1523

how to fetch test data from Database by using QTP?

In order to fetch test data from Database we have to create a adobdb connection object to connect with data base. the syntax is .... >CreateObject("Adodb.connection").
Asked by: vijaykumary | Member Since Sep-2005 | Asked on: Sep 18th, 2005

View all questions by vijaykumary

Showing Answers 1 - 2 of 2 Answers
annjose

Answered On : Dec 26th, 2005

right click ont he database table.sheet->import->databasecreate the connectionwrite the sqlann jose

  
Login to rate this answer.
ramkumary

Answered On : Sep 29th, 2006

View all answers by ramkumary

Hai Const adOpenStatic = 3Const adLockOptimistic = 3Const adUseClient = 3Set objCon=CreateObject("ADODB.Connection") Set objRec=CreateObject("ADODB.Recordset")objCon.Open "DRIVER={Oracle in OraHome92};SERVER={Servername};UID={Username};PWD={Password};DBQ={Dbnmae}"objRec.CursorLocation = adUseClientobjRec.Open "Select {Col name} from tablename",objCon,adOpenStatic,adLockOptimisticWhile(objRec.EOF)    objRec.MoveNext    Msgbox "Result" & objRec.Fields.Item("{Col name}")& vbCrLf WendobjRec.CloseobjCon.CloseSet objRec=NothingSet objCon=NothingMsgbox "Executed Sucessfully"ramyoganathan@aim.comWarm regRam.

Yes  1 User has rated as useful.
  
Login to rate this answer.

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

Related Open Questions

Ads

Connect

twitter fb Linkedin GPlus RSS

Ads

Interview Question

 Ask Interview Question?

 

Latest Questions

Interview & Career Tips

Get invaluable Interview and Career Tips delivered directly to your inbox. Get your news alert set up today, Once you confirm your Email subscription, you will be able to download Job Inteview Questions Ebook . Please contact me if you there is any issue with the download.