Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Incorrect syntax near 'int'

Reply
Thread Tools

Incorrect syntax near 'int'

 
 
David
Guest
Posts: n/a
 
      04-06-2006
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


 
Reply With Quote
 
 
 
 
OHM \( One Handed Man \)
Guest
Posts: n/a
 
      04-06-2006
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.

--
( OHM ) - One Handed Man
AKA Terry Burns - http://TrainingOn.net
"David" <> wrote in message
news:e5Y$...
>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
>



 
Reply With Quote
 
 
 
 
sirfunusa
Guest
Posts: n/a
 
      04-06-2006
Run SQL Profiler to see the actual SQL syntax being sent (assuming SQL
Server)

 
Reply With Quote
 
Juan T. Llibre
Guest
Posts: n/a
 
      04-06-2006
Or, simply, do a response.write which outputs the SQL statement to the page.

It's amazing the errors you can catch by doing that.




Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en espaņol : http://asp.net.do/foros/
===================================
"sirfunusa" <> wrote in message
news: oups.com...
> Run SQL Profiler to see the actual SQL syntax being sent (assuming SQL
> Server)



 
Reply With Quote
 
sirfunusa
Guest
Posts: n/a
 
      04-07-2006
Except if you due pure databinding in VB.NET, the raw SQL statement is
not available.

 
Reply With Quote
 
Juan T. Llibre
Guest
Posts: n/a
 
      04-07-2006
So, how does it get called ? By osmosis ?

The SQL statement has to reside somewhere.
It can be retrieved from wherever that somewhere is, then.




Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en espaņol : http://asp.net.do/foros/
===================================
"sirfunusa" <> wrote in message
news: oups.com...
> Except if you due pure databinding in VB.NET,
> the raw SQL statement is not available.



 
Reply With Quote
 
sirfunusa
Guest
Posts: n/a
 
      04-07-2006
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 "

 
Reply With Quote
 
David
Guest
Posts: n/a
 
      04-07-2006
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

"David" <> wrote in message
news:e5Y$...
>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
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Incorrect syntax near '*' Mario Krsnic ASP .Net 5 01-27-2007 08:01 PM
Line 1: Incorrect syntax near ')'. how to fix it levis ASP .Net 0 09-20-2006 10:19 AM
Visual Studio Incorrect Syntax Near The Keyword Default Information JMUApache ASP .Net 2 09-04-2005 12:41 PM
SqlClient.SqlException: Line 1: Incorrect syntax near '='. Patrick Olurotimi Ige ASP .Net 4 03-18-2005 01:53 PM
System.Data.SqlClient.SqlException: Line 1: Incorrect syntax near =?Utf-8?B?UGF0cmljay5PLklnZQ==?= ASP .Net 3 10-11-2004 10:21 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57