How do you connect to database ,What is the script to
connect DATA BASE?
Answers were Sorted based on User's Feedback
Answer / sandipgami84
u need to put above code in "GetSQLData" Function
Is This Answer Correct ? | 3 Yes | 1 No |
Answer / sandipgami84
u need to installed "mysql-connector-odbc-3.51.27-win32",
then write down below code,
Dim objCon, ObjRecordSet
ConnString = "Driver=MySQL ODBC 3.51 Driver; server=ServerIP"
ConnString = ConnString &";database=DBName"
ConnString = ConnString &";user=DBusername"
ConnString = ConnString &";password=DBPassword"
Set objCon = createobject("ADODB.Connection")
objCon.Open(ConnString)
Set ObjRecordSet = CreateObject("ADODB.Recordset")
ObjRecordSet.Open CStr("Select * From tbName Where Id =
'1'),objCon
If (not ObjRecordSet.EOF) then
For I = 0 To ObjRecordSet.Fields.Count - 1
If I = 0 Then
On Error Resume Next
GetSQLData = Trim(Cstr(ObjRecordSet.Fields(I)))
Else
On Error Resume Next
GetSQLData = Trim(CStr(GetSQLData)) & "," &
Trim(CStr(ObjRecordSet.Fields(I)))
End If
Next
End If
ObjRecordSet.close
objCon.close
Set ObjRecordSet = Nothing
Set objCon = Nothing
DataBaseConnection = GetSQLData
GetSQLData = ""
-----------
Sandip Gami
+91-9714177088
Is This Answer Correct ? | 2 Yes | 1 No |
what is the data driven testing?
How to Analyze the Checpoint results by Text/Text Area Checkpoint?
how can i prepare for QTP(8.2) to face interview ? give over view details?
Hi any body pls help me for QTP 11.0 software free demo version. i have to practice. Kindly send the link.or where i have to download.
a title of first page is "LKO- microsoft internet explorer", of the second page is "PPM- microsoft internet explorer" , of Third page is "TTS- microsoft internet explorer" and same changing title on the fourth page. How can we use regular expression for this feature what should we do on script part on and Object repository part so that we can get successful run result. Kindly explain the steps script.
get the order no from the following orderdetails orderstring="ORD13456PNR" eg:13456
How many ways we can parameterize data in quicktest professional (qtp)?
What is the differences between image check point and bit map check point?
How can we use regular expressions for a table in web page, each cell in table having unique identification, Now I want to count number of rows in table and enter data in all cells of the table?
1...HOW MANY TYPES OF OBJECT REPOSITORY ARE THERE IN QTP? 2....WHAT ARE THE REPOSITORY FEATURES EXPLAN. 3...HOW TO CREATE A RECOVERY SCENARIO? WHAT DOES RECOVERY SCENARIO MANAGER DO? 4...OPEN A WORD FILE AND MODIFIED WITH SOME VALUE USING QTP? 5... HOW TO CREATE EXCEL FILE USING QTP? 6... HOW TO RETRIEVE A VALUE FROM WEB TABLE? 7... WHAT IS QC REQUIREMENT TAB DO ? HOW TO MAP THE REQUIREMENT? 8... HOW TO PASS A VALUE FROM EXCEL FILE TO SCRIPT? 9...WHAT IS THE USE OF SPLIT FUNCTION?
How will u test content of an web application with out using chechpoints in QTP 9.2?
assume i have few url link how will i dynamically call then using descriptive programming?