Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Ken Blum
  Where is Ken Blum?
 Chicago
 Illinois - United States
 Ken Blum
 To: Nathan Gloyn
  Where is Nathan Gloyn?
 Torquay
 United Kingdom
 Nathan Gloyn
 Tags
Subject: RE: Handling SQL errors
Thread ID: 33905 Message ID: 33908 # Views: 1 # Ratings: 0
Version: Visual FoxPro 6 Category: Databases, Tables and SQL Server
Date: Thursday, December 04, 2003 9:30:28 PM         
   


> Running various SQL statements and need to add error/exception handling.
>
> My question is does VFP support functions/properties such as @@Error in SQL Server or do I treat it like VB and utilise an On Error code block and trap errors that way?
>
> Nathan
From VFP Help...

If a SQL pass-through function returns an error, Visual FoxPro stores the error message in an array. The AERROR( ) function provides information about errors that are detected in any of the component levels: Visual FoxPro, the ODBC data source, or the remote server. By examining the values returned by AERROR( ), you can determine the server error that occurred and its error message text.

Caution You must call AERROR( ) immediately to obtain error information. If you generate any other error before you call AERROR( ), the error information is lost.

KTB

ENTIRE THREAD

Handling SQL errors Posted by Nathan Gloyn @ 12/4/2003 9:08:06 PM
RE: Handling SQL errors Posted by Ken Blum @ 12/4/2003 9:30:28 PM
RE: Handling SQL errors Posted by Foxhound @ 12/5/2003 9:28:37 AM
RE: Handling SQL errors Posted by Nathan Gloyn @ 12/5/2003 1:50:05 PM
RE: Handling SQL errors Posted by Foxhound @ 12/5/2003 3:17:20 PM