Hi!
I do not remember exactly. Could be just an omission when I copy/paste. Sure that extra verification is not required.
>>Hi!
>>
>>Just try to run a simple query:
>>
>>
>>lc___OldError = ON("ERROR")
>>ON ERROR llError = .T.
>>llError = .F.
>>
>>llConnectionIsValid = SQLEXEC(nConnectHandle,"SELECT 1 as Test","TestResult")>0 and used("TestResult")
>>if llError
>> llConnectionIsValid = .F.
>>endif
>>if used("TestResult")
>> use in TestResult
>>endif
>>
>>ON ERROR &lc___OldError
>>
>>
>>After above code llConnectionIsValid will contain .T. if connaction is still working.
>>>Best Regards,
>>>
>>>Justy Chow
>
>Hi Vlad,
>I was wondering : you check if of the returnvalue of the query is >0 AND if the cursor exists. Can you get back a positive value without an existing resultcursor ? In other words do both have to be tested ?
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.comICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs
It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.