make sure the compiler uses debug DCU.
set a breakpoint in the first line of the TSQLResolver.DoExecSQL
procedure in the db\Provider
block
run an operation that causes an error message (for example, changing a record in a component that supports data)
if the debugger is stopped, you can view the created SQL command
check SQL statement for conditions that may cause an error
At this point, only constant expressions in an expression of the type ... 'can be checked, where Field1 is zero and Field2 = 0'. in DoExecSQL, the SQL statement uses placeholders (?) for parameter values, so if the conditions of the constant expression do not show anything useful, continue debugging:
- to see the actual parameter values, set a breakpoint in the TSQLConnection.Execute function (in the SqlExpr block) and go through the parameter evaluation cycle.
source share