Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to sure the connection still connected
Message
From
07/09/2001 08:47:36
 
 
To
07/09/2001 08:36:05
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00553609
Message ID:
00553685
Views:
13
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.com
ICQ #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.
Previous
Reply
Map
View

Click here to load this message in the networking platform