I think that documentation for DBExecutePreparedSQL function contains a bug.
The description for return value resultCode states:
Statement execution handle that identifies the statement and is a parameter to other functions. If the return value is less than or equal to 0, the LabWindows/CVI SQL Toolkit was not able to execute the statement.
but it doesn't seem a statement execution handle.
The main difference is that 0 is returned if everything works fine.
Could you verify (and hopefully fix it), please?