Hello
We’ve migrated our application from ADO to SDAC.
The final step was to replace our own pooling to the SDAC functionality.
In the main application everything seems to work fine. But our automated tests aren’t working.
If we deactivate the pooling everything works, but not with pooling enabled.
At some point the exception “Update failed. Found 0 records” is thrown.
The StrictUpdate options is enabled and we'd like to keep it that way.
Our first assumption was the big amount of SQL Statements in these test’s, which will be executed in a small amount of time.
But we couldn’t find any indications.
It’s noteworthy that we updated the SDAC Source for our needs in terms of getting the actual id with IDENT_CURRENT.
We tried to set up a test project for you but it’s difficult because there are many dependencies on our own code.
Any suggestions would be appreciated because this problem gives us a headache.
Best regards
“Update failed. Found 0 records” with pooling enabled
Re: “Update failed. Found 0 records” with pooling enabled
The 'Update failed. Found 0 records' error occurs, because no record matched the WHERE condition.
Please analyze the SQL query, that is executed while calling Post. It can be seen using the dbMonitor tool. You can find out from the SQL query how many records match the WHERE condition.
Please analyze the SQL query, that is executed while calling Post. It can be seen using the dbMonitor tool. You can find out from the SQL query how many records match the WHERE condition.
Re: “Update failed. Found 0 records” with pooling enabled
The problem occurs only when pooling is set to true. If pooling is set to false everything works fine.
We assume that OLE DB will return a false RowsAffected value, if many small statements will be executed in a short time window.
And when we debug the execution of those statements and pause a little bit in between there is no error.
We wonder why this happens when pooling is set to true.
We assume that OLE DB will return a false RowsAffected value, if many small statements will be executed in a short time window.
And when we debug the execution of those statements and pause a little bit in between there is no error.
We wonder why this happens when pooling is set to true.
Re: “Update failed. Found 0 records” with pooling enabled
Unfortunately, we couldn't reproduce the issue. To ivestigate the issue, please compose a small sample reproducing the issue and send it to viktorv*devart*com , including scripts to create database objects.
Re: “Update failed. Found 0 records” with pooling enabled
We’ve found the problem!
One of our internal objects executed SQL Statements which were for the same batch on different connections.
In this SQL Batch NOCOUNT was set to ON but wasn’t disabled on the same connection.
Without pooling it wasn’t a problem because the connection was closed again.
But with pooling enabled the same connection was reused and so this option was still active.
We call Open on the connection of the Dataset so that the connection will not be returned to the pool.
However thank you for your help.
One of our internal objects executed SQL Statements which were for the same batch on different connections.
In this SQL Batch NOCOUNT was set to ON but wasn’t disabled on the same connection.
Without pooling it wasn’t a problem because the connection was closed again.
But with pooling enabled the same connection was reused and so this option was still active.
We call Open on the connection of the Dataset so that the connection will not be returned to the pool.
However thank you for your help.
Re: “Update failed. Found 0 records” with pooling enabled
We are glad to know you have found a solution for the issue. Please contact us if you have any questions concerning SDAC.