07-09-2008, 08:54 PM
I think this should work...
Thanks,
-Ashok
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