Wednesday, April 20, 2011

How to connect to Database in QTP?

I recieved a mail by user(Swati) regarding database connectivity. thank you very much for suggestion...

Const adOpenStatic = 3
Const adLockOptimistic = 3
Const adUseClient = 3

Set objConnection = CreateObject("ADODB.Connection")
Set objRecordset = CreateObject("ADODB.Recordset")

objConnection.Open "DRIVER={Microsoft ODBC for Oracle};UID=;PWD="

objRecordset.CursorLocation = adUseClient
objRecordset.CursorType = adopenstatic
objRecordset.LockType = adlockoptimistic

ObjRecordset.Source = "select field1,field2 from testTable"
ObjRecordset.ActiveConnection = ObjConnection
ObjRecordset.Open 'This will execute your Query

If ObjRecordset.recordcount>0 Then
Field1 = ObjRecordset("Field1").Value
Field2 = ObjRecordset("Field2").Value
End If

Tuesday, April 19, 2011

Online Services

Online Training (QTP, QTP Framework).
Online prepration of QTP Certifications.
Online Training (VB Scripting)
Sell QTP Framework.
QTP Dumps for certification.
Setup of Testing Environment for Automation Testing.
Providing candidates for Automation Testing.
Project work for Automation Testing Testing.
Project Work on contract Basis.

Please mail me for any type of services
shahadat.it786@gmail.com