title: Debugging "Incorrect Syntax" Exception
body: <p>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.</p>
  
  <p>Running SQL Profiler with EventClass Exception, and User Error Message selected, I see:</p>
  
  <p>Exception   Error: 102, Severity: 15, State: 1<br>
  User Error Message  Incorrect syntax near '3'.</p>
  
  <p>However I really want to see the full SQL that is being supplied by the COM+ component.</p>
  
  <p>Is there anyway for me using Profiler, or other, for me to intercept the SQL statement that was sent to the SQL Server?</p>
  
  <p>This machine is using SQL Server 2005, and the COM+ object is written in Delphi.</p>