How do I find the reason for a “Record not found or changed by another user” error when working with dbExpress?
How do I find the SQL statement (with the actual parameter values) that fails?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
make sure that the compiler uses Debug DCUs.
set a breakpoint in the first line of the Procedure
TSQLResolver.DoExecSQLin unitdb\Providerrun the operation which causes the error message (for example, modifying a record in a data-aware component)
if the debugger stops, the generated SQL command can be viewed
check the SQL statement for conditions which could cause the error
At this point, only constant expressions in the statement like … ‘where Field1 is null and Field2 = 0’ can be checked. in DoExecSQL, the SQL statement uses placeholders (?) for parameter values, so if the constant expression conditions did not show anything helpful, continue debugging: