Incorrect syntax near 'int'

  • Thread starter Thread starter David
  • Start date Start date
D

David

I am using VS2005 and .Net 2.0 with a DetailsView control tied to an
SqlDataSource. I get the above error when I click the Update link button on
the control. I cannot see where this "int" is anywhere in my UpdateCommand
string. How can I debug this error? Thanks.

David
 
post your sql statement. Not a calculated one, the one at the point at which
it will be used, so use debug to stop it before you issue and execute
command or whatever.
 
Run SQL Profiler to see the actual SQL syntax being sent (assuming SQL
Server)
 
Except if you due pure databinding in VB.NET, the raw SQL statement is
not available.
 
I stand corrected. For some reason (lack of sleep?), I had thought the
code was hidden in VB.NET. It's in the collapsed #Region " Web Form
Designer Generated Code "
 
Below is what I have in the UpdateCommand string of the SqlDataSource used
in the DetailsView control that I am using:

UPDATE [File_Mst] SET [Firm] = @Firm, [Open Date] = @OpenDate, [Close Date]
= @CloseDate, [Box Num] = @BoxNum, [Destruction] = @Destruction, [LitRpt] =
@LitRpt, [QtrRpt] = @QtrRpt, [CorpFile] = @CorpFile, [OffBoxNum] =
@OffBoxNum, [OffOpenDate] = @OffOpenDate, [OffCloseDate] = @OffCloseDate,
[OffDestruction] = @OffDestruction, [OffDestroyed] = @OffDestroyed,
[Destroyed] = @Destroyed, [Relocated] = @Relocated, [Verified] = @Verified,
[Electronic] = @Electronic, [CheckedOut] = @CheckedOut, [CheckedOutDate] =
@CheckedOutDate WHERE [File Number] = @File_Number

Does this help?

David
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top