Kevin Cully wrote:
> As a developer, I like to open up global connections and keep them open. 
>     From a DBA perspective, they like us meager developers to close the 
> connections to help with server resources, and (I suspect the real 
> reason) is that they don't violate their licensing.
>
> I haven't ever had problems with the connection using VFP to SQL Server. 
>   I don't have enough experience with MySQL to say however.  I would 
> think that a connection manager, that wraps communications in a TRY 
> CATCH would work well when attempting to keep connections open.
>
>   

Here's what I use to test the current handle and if it doesn't return a 
1, I ask for a new handle from my GetHandle routine:

        IF SQLEXEC(liHandle,"show tables","curTables") <> 1 THEN && just 
an extra check to make sure we've got a good, active handle...if not, 
retry one more time
            liHandle = this.GetHandle(.T.) && pass .T. to force new handle
        ENDIF && SQLEXEC <> 1


-- 
Michael J. Babcock, MCP
MB Software Solutions, LLC
http://mbsoftwaresolutions.com
http://fabmate.com
"Work smarter, not harder, with MBSS custom software solutions!"



_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to