Micro Focus QTP (UFT) Forums
Issue in database testing - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: Issue in database testing (/Thread-Issue-in-database-testing)



Issue in database testing - excellentpawan - 03-24-2015

I tried to get string from a database but it does not work please help

Code:
test_id=Browser("text:=.*").Page("text:=.*").Webtable("html id:=tablepaging").GetCellData(3,2)
test_id = cint(test_id)
connection = "Driver={MySQL ODBC 3.51 Driver}; Server=192.168.0.26; Database = master;user=root; password="
Set conn = createobject("adodb.connection")
Conn.open connection
Set ors = conn.execute("select * from test where id = 'test_id'")
If ors.EOF <>True Then
    print (ors.GetString)
End If