The information in this article applies to:
SUMMARYThe DBERROR() function from previous versions no longer exists nor does an equivalent SQLERROR() function that you might expect to find. There are still ways to find out the same information though. The function AERROR() is used throughout the product for retrieving error information and the SQLSETPROP() function also gives us some control over the SQL error messages specifically. MORE INFORMATIONFirst MethodUsing Aerror() will create an array containing the error code and error message. It could be implemented as follows for catching the full ODBC error that occurs when connecting to a datasource :
Second MethodSetting up similar error trapping would be to use the SQLSetProp() function to set the DispWarning property to True. This will actually be easier than the old DBError() function because once this is set the full ODBC error text will automatically be displayed without having to test the return value or having to fill variables and display them yourself. A connection handle of 0 sets this as a default for all subsequent connections.
Additional query words: VFoxWin ck
Keywords : |
Last Reviewed: August 20, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |