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 |
how can i pass parameters into function?
is qtp 9.2 supported for firefox browser3.0?bcoz when i tried to create scripts with the application run on firefox browser 3.0 then qtp 9.2 didn't ct=reate the scripts?
Does quicktest professional is unicode compatible?
Plz explain about MATCH/EXACT MATCH/IGNORE SPAGE in text check points?
After coming to know that QTP could not identify non-standard objects, we set those non-standard objects as virtual objects using Virtual object wizard. But how can we identify that qtp could not identify non-standard objects?
Can anyone pls tell me in realtime (descriptive programming) how will the properties of the object be given to the test team. R they given in an excel sheet and is the same sheet also given to the development team and by whom is this given? Thanks a lot.
Hello Friends, I am working with QTP 9.2 descriptive programming. Can you please let me know how to work with below. Browser is IE, for my site, it opens another page with different browser name, For example Parent Page is google.com and child page is inteview questions. How to work with this second page.
I wnnt to learn about QTP Automation Framework,please give URL Address to get more information about AFW.
Hello everybody, can we maintain the state of page in QTP? 1. suppose i opened a notepad text file i entered some text and changed the font type and font size and saved that file. 2. Now next time when i will open a new notepad file it is showing me that font type and size which i changed in my previous step. 3. Here i want that QTP should capture the default setting i.e. it should maintain the state of the page. Thanks in advance, Gaytri
how to compare two bitmaps( 1. clients requirement & 2. Designed by dev) in qtp 8.2 wann clear steps
what is the defference between QTP 8.2 and 9.0and 9.2? plz tell me
in process of project exaplnation the defects are says frequently r not?