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 defference between calling ation and called action?
What is a recovery scenario?
What will be the test script in QTP to test a ComboBox where a user has to select more than two items????
Write the code for select the 5 values from drop down list. drop down list having the 10 values.
what is meant by iterative model?What is its working principle?What are its advantages and what are its drawbacks?
How to check the value for variables during run time. Pls anybody can give the answer.. Thanks in advance...
How to create scenario selector
Hi, OUR PROJECT NAME IS: HOSPITAL CONTROL SYSTEM. IS IT COMES UNDER WHICH DOMAIN(HEALTH CARE OR HEALTH INSURANCE)
Can we test GUI of the application using QTP.? How.?If possible briefly explain process.?
What is fragmentation and paging?
What is time parameter?
Have you faced any problems with object repository?