>Thank you, Thomas. I already capture the content of the error() array. I was looking to see if there is anything "extra" I can get to the error log file.
Route your SQL through one class so there you can have the error catching code in one place. If SQLExec() returns 0 or less, aError() and then log the contents of the array. Mind you, you may get multiple rows. Ditto for COM errors, where On Error and Try-catch will just say it's an OLE error or some such, aError() may give you additional info.
The trouble with using aStackinfo() with try-catch is that it will have the catch command as the place where it happened, which isn't quite helpful, specially if the error occurred several calls deep inside the try-catch block - you won't know where. So better start making smaller catch blocks at deeper levels and also log all relevant properties of the exception object - the actual routine and lineno where the error happened is in there, which may help you narrow down the location.