Debugging "Incorrect Syntax" Exception

Posted by MattH on Stack Overflow See other posts from Stack Overflow or by MattH
Published on 2010-05-12T13:53:58Z Indexed on 2010/05/14 10:54 UTC
Read the original article Hit count: 266

I have recently been working with a COM+ component that processes an input XML file, and makes a number of database updates based on the supplied data.

Running SQL Profiler with EventClass Exception, and User Error Message selected, I see:

Exception Error: 102, Severity: 15, State: 1
User Error Message Incorrect syntax near '3'.

However I really want to see the full SQL that is being supplied by the COM+ component.

Is there anyway for me using Profiler, or other, for me to intercept the SQL statement that was sent to the SQL Server?

This machine is using SQL Server 2005, and the COM+ object is written in Delphi.

© Stack Overflow or respective owner

Related posts about sql-server

Related posts about sql-server-profiler