Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to sure the connection still connected
Message
 
 
À
07/09/2001 08:36:05
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00553609
Message ID:
00553685
Vues:
12
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.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform