Micro Focus QTP (UFT) Forums
where do my return values go? (SQL-Query) - 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: where do my return values go? (SQL-Query) (/Thread-where-do-my-return-values-go-SQL-Query)

Pages: 1 2


RE: where do my return values go? (SQL-Query) - ashokghali - 07-09-2008

I think this should work...

Code:
Function CheckStat (AppID)
Dim objDB, strupdate
Set objDB = CreateObject("ADODB.Connection")
objDB.ConnectionString = "..."
objDB.Open
strupdate = "select mailstat from systemstatus where systemid='"&AppID&"' and testtime=(select max(TESTTIME) from systemstatus where systemid='"&AppID&"')"
Set objrs = objDB.Execute(strupdate)
CheckStat = objrs(0)
objDB.close
End Function

Thanks,
-Ashok


RE: where do my return values go? (SQL-Query) - Tim.Schmidt - 07-10-2008

Thanks alot Ashok!

I was thinking about testing that, so it needs an object to read from a database, even if I only read 1 value.

Thanks again Smile its working properly now.