Sub CheckT(P As String)As ResumableSub
Dim m As Map
m.Initialize
m.Put("ConnOk",False)
m.Put("ReqOK", False)
Dim Req As DBRequestManager = CreateRequest
Dim cmd As DBCommand = CreateCommand("QueryName",Array(P))
Wait For (Req.ExecuteQuery(cmd, 0, Null)) JobDone(j As HttpJob)
If j.Success Then
m.Put("ConnOk",True)
Req.HandleJobAsync(j, "req")
Wait For (Req) req_Result(res As DBResult)
'Req.PrintTable(res)
If res.Rows.Size>0 Then
Dim record() As Object=res.Rows.Get(0)
If record(res.Columns.Get("cTAG"))=0 Then
m.Put("ReqOK", True)
End If
End If
Else
Log("ERROR: " & j.ErrorMessage)
Msgbox(j.ErrorMessage,"Error")
End If
j.Release
Return m
End Sub