Actually @@identity does have other uses, and depending on your backend server you may not want to use it (Microsoft SQL Server comes to mind) but I only work with MariaDB (MySQL) so it provides all I need.

Google "select @@identity" and see if there are any issues using it with your backend server.

Mike Copeland

-------- Original Message --------
Subject: Re: Broken Connection and Remote Views
From: Stephen Russell <[email protected]>
To: [email protected]
Date: 9/25/2013 2:39 PM
On Wed, Sep 25, 2013 at 2:19 PM, Mike Copeland <[email protected]> wrote:

There are probably better ways to do it, but I use

     nResult=SQLEXEC(datahandle,'**SELECT @@identity')

If nResult is 0 then I just assume that there is a problem and proceed to
disconnect, throw away the old handle, and then reconnect. If that fails,
then bail out.  "Select @@identity" has a very low footprint, returning
nothing and only useful to see if the communication link is still valid (as
far as I know.)

Some Fox error codes to look for would be 1526, 1466, and 2006.

-------------


I was going to do a count on a tiny table but @@Identity is good as well.
  Either you are connected or you are not.



_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/[email protected]
** 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