Q: Best way to return error from stored procedures
Posted in 1994
What is the best way to return error codes from stored procedures to a Windows 3.1 client using ODBC? We have been using stored procedures but need a way to trap a DB error to pass back to the client (ie. duplicate keys). In addition we have stored procedures that return a result set (return with resume), but if there is an error how can we intercept it and pass it up to the client application. Has anybody done this yet? We return a string with error # and some text using one CRecordset, but need a second one to handle a stored procedure that returns a set of values. There has to be a better way of trapping errors!! We don't have ESQL, but don't even know if it would help with this issue. BTW, why aren't stored procedures talked about in the FAQ?