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.
HTH.
>Dear friends,
>
>I'm developing a client/server application. I made the connection between SQL server and client using SQLStringConnect command at the program start. And the connection handle will be shared within the program. But how can I check the connection is still connected before update or retrieve the data. I'm a beginner for CS application. Thank you for your help and advice.
>
>Best Regards,
>
>Justy Chow
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.