Re: How to check whether connection is valid

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Hitendra (Hitendra_at_discussions.microsoft.com)
Date: 08/16/04

  • Next message: Marlon Abeyegunawardene: "Invalid call issued while executing a SQLMORERESULTS() sequence."
    Date: Sun, 15 Aug 2004 23:05:01 -0700
    
    

    Cindy,

    We are doing exactly what you suggested. Creating a connection handle when
    the application starts, checking it to be >0 and using that throughout. After
    repeated execution of SQLExec commands, sometimes the application crashes
    with Fatal Exception error and I suspect that the original handle may have
    got deleted at Oracle backend. Any way of finding out whether the handle
    still exists and is working fine at Oracle backend?

    Thanx,
    Hitendra

    "Cindy Winegarden" wrote:

    > 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,
    >
    >
    >


  • Next message: Marlon Abeyegunawardene: "Invalid call issued while executing a SQLMORERESULTS() sequence."

    Relevant Pages

    • How to check whether connection is valid
      ... Our application is encountering Fatal Exception Errors with Oracle Backend, ... connection at application startup and use this connection throughout to ... somehow and since VFP doesn't know about it while sending SQLExec() ... it FEs in that case. ...
      (microsoft.public.fox.vfp.queries-sql)
    • remote view vs sqlexec()
      ... Someone told me that sqlexec() is better than remote view because it ... would not maintain a connection to the sql server. ...
      (microsoft.public.fox.programmer.exchange)
    • Re: How to check whether connection is valid
      ... If nConn is>0 then should have a good connection. ... > perform SQLExecoperations on the backend, ... > somehow and since VFP doesn't know about it while sending SQLExec() ... it FEs in that case. ...
      (microsoft.public.fox.vfp.queries-sql)
    • Re: remote view vs sqlexec()
      ... will remote view consume more network resources on the sql server than ... > - you can chose between creating a new connection or using a connection that ...
      (microsoft.public.fox.programmer.exchange)
    • Re: remote view vs sqlexec()
      ... > Someone told me that sqlexec() is better than remote view because it ... > would not maintain a connection to the sql server. ...
      (microsoft.public.fox.programmer.exchange)