Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
where do my return values go? (SQL-Query)
#11
Solved: 11 Years, 4 Months ago
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
Reply
#12
Solved: 11 Years, 4 Months ago
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.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Exe invoked through UFT is unable to access IIS and SQL Server service bkdevise 0 2,146 08-25-2015, 05:49 PM
Last Post: bkdevise
  Function return value is not passed during the 3rd iteration premanand1979 0 2,253 10-16-2014, 09:40 PM
Last Post: premanand1979
  Query regarding "Call" statement anupam4j 1 2,028 09-26-2014, 01:46 PM
Last Post: vinod123
  parameterize Excel Sheet Name in SQL bjitsidhu 0 2,907 07-20-2014, 08:34 AM
Last Post: bjitsidhu
  Is there a possible way to execute sql in QTP using 'WITH' clause shruthic 0 3,098 04-26-2014, 11:42 PM
Last Post: shruthic

Forum Jump:


Users browsing this thread: 1 Guest(s)