If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

I think I will have a solution in few days that I can post here to test.

Actually I'm facing the problem that every single ADODB operation can fire an error but I'm only able to catch the last one.
So, if an operation composed by 3 steps fails at first or second step but third is OK, I get no error.

An example, the following code taken from \thinBasic\SampleScripts\ADODB\ example is composed by 4 pRecordset calls (record count plus 3 field data retrieve).
If error occurs in one of the first 3 calls but the 4th is ok, I get no error.

I've developed something that can be a start.
I've modified all internal ADODB functionality in such a way to intercept errors at any level.
All errors are stored into an internal Module repository in such a way programmer can check and decide what to do.

Mainly I've developed 3 functions:

AdoDb_Errors_Count: will return number of errors so far intercepted

AdoDb_Errors_Clear: will clear internal errors repository. Can be called whenever programmer wants to reset situation

AdoDb_Errors_GetCode(Idx): will return error code in Idx position with Idx between 1 and AdoDb_Errors_Count

AdoDb_Errors_GetDescription(Idx): will return error description in Idx position with Idx between 1 and AdoDb_Errors_Count

An example on how to use:

'---Do whatever with ADODB ... then check if some error.
printl "-----"
printl "Errors found:", AdoDb_Errors_Count
if AdoDb_Errors_Count then
for lError = 1 to AdoDb_Errors_Count
printl AdoDb_Errors_GetCode(lError), AdoDb_Errors_GetDescription(lError)
next
end if
printl "-----"
AdoDb_Errors_Clear

Attached an updated thinBasic_AdoDB module to put into \thinBasic\Lib\ substituting your current one.

As I said, this is just a start in order to have something.
I will see If I can develop something that react as an event.

No error but also no new rrecord in the database.
If I change the code to produce an error ( bad table name) the function ado_check reports errors
but raise an error "FOR LERROR = 1 TO ADODB_ERRORS_COUNT"