Re: How to check whether connection is valid

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Cindy Winegarden (cindy.winegarden_at_mvps.org)
Date: 08/15/04


Date: Sun, 15 Aug 2004 15:32:41 -0400

Hi Hitendra,

When you connect, store the value of the connection handle to a variable:

nConn = SQLConnect(....)

If nConn is >0 then should have a good connection.

-- 
Cindy Winegarden  MCSD, Microsoft Visual FoxPro MVP
cindy.winegarden@mvps.org  www.cindywinegarden.com
"Hitendra" <Hitendra@discussions.microsoft.com> wrote in message 
news:DC68117D-1512-4828-AC47-1916F2DAE056@microsoft.com...
> Our application is encountering Fatal Exception Errors with Oracle 
> Backend,
> inspite of having the latest Service Pack & ODBC drivers. We create a
> connection at application startup and use this connection throughout to
> perform SQLExec() operations on the backend, where it sometimes generates
> these FEs.
> I suspect that Oracle backend may be clearing or deleting the connection
> somehow and since VFP doesn't know about it while sending SQLExec()
> statement, it FEs in that case.
> Is it possible to check whether a connection is still valid and will fire
> properly with any Backend?
> Please let me know.
> Thanx, 


Relevant Pages

  • Re: The timeout period elapsed prior to obtaining a connection fro
    ... backend, and here's the exact error we get. ... connection from the pool. ... connections were in use and max pool size was reached. ... it's made up of 4x frontend servers running MS ...
    (microsoft.public.dotnet.general)
  • Re: Follow Up...Solution (But a Bad One?)
    ... In our main app, we have created a "dummy" ADO connection which points ... directly to the Access backend. ...
    (microsoft.public.vb.database.ado)
  • Re: Homegrown synchronization
    ... who are connected to the production backend. ... Use Jet, not the file system, to get your copy of the data. ... connection) and saved myself a heap of work. ...
    (microsoft.public.access.replication)
  • RE: Check BE location and Relink
    ... The correct syntax is: ... Now I can just compare that with my preferred connection. ... with multiple tables in the backend... ... Private Function IsDataOk() As Boolean ...
    (microsoft.public.access.modulesdaovba)
  • RE: Check BE location and Relink
    ... Now I can just compare that with my preferred connection. ... "Jack Leach" wrote: ... with multiple tables in the backend... ... Private Function IsDataOk() As Boolean ...
    (microsoft.public.access.modulesdaovba)