473,407 Members | 2,546 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

Incorrect syntax near 'int'

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
Apr 6 '06 #1
7 2207
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" <dl*****@lifetimeinc.com> wrote in message
news:e5**************@TK2MSFTNGP03.phx.gbl...
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

Apr 6 '06 #2
Run SQL Profiler to see the actual SQL syntax being sent (assuming SQL
Server)

Apr 6 '06 #3
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" <si*******@hotmail.com> wrote in message
news:11**********************@e56g2000cwe.googlegr oups.com...
Run SQL Profiler to see the actual SQL syntax being sent (assuming SQL
Server)

Apr 6 '06 #4
Except if you due pure databinding in VB.NET, the raw SQL statement is
not available.

Apr 7 '06 #5
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" <si*******@hotmail.com> wrote in message
news:11**********************@i39g2000cwa.googlegr oups.com...
Except if you due pure databinding in VB.NET,
the raw SQL statement is not available.

Apr 7 '06 #6
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 "

Apr 7 '06 #7
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" <dl*****@lifetimeinc.com> wrote in message
news:e5**************@TK2MSFTNGP03.phx.gbl...
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

Apr 7 '06 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: J. Muenchbourg | last post by:
IN the code below, I am getting an Incorrect Syntax near "," error (the sql execute line, and it is pointing to position 1 ) (the display formatting here may look different than my script): ...
1
by: Amit D.Shinde | last post by:
Hi Experts, i am writting a stored procedure in sql server 7. Its a simple stored procedure It is my first stored procedure. I want insert a record in table if the primary key field user id...
1
by: Jeff Magouirk | last post by:
Dear Group, I am trying to create a view and keep getting the Incorrect syntax near the keyword 'Declare'" error. Here is the code I am writing. Create view fixed_airs (sid, fad_a2, fad_a3)...
3
by: teddysnips | last post by:
In the script below is the DDL to create some tables and a UDF. What I'm interested in is the UDF at the end. Specifically, these few lines: --CLOSE OTRate --DEALLOCATE OTRate ELSE --...
1
by: Sandesh | last post by:
Hello All, Me saying " has any body come across such error would be underestimating". Well I am getting a very peculiar and unique error "Line 1: Incorrect syntax near 'Actions'." ...
1
by: iporter | last post by:
In the following code, the two Response.Write statements output exactly the same - I can copy and paste both into Query Analyzer, and run them fine. However, if I comment out line 3, the...
0
by: roamnet | last post by:
hi i created database file with .mdf extention ,sql server as a source and use grid view to display data there're no problem in data retrieve and display,but i want to edit it or insert new...
10
by: arial | last post by:
Hi, I am getting this error message: Incorrect syntax near the keyword 'where'. Description: An unhandled exception occurred during the execution of the current web request. Please review...
5
by: =?Utf-8?B?QW5kcmV3?= | last post by:
Hi, What is wrong with this code ? I got this error: " Line 1: Incorrect syntax near 'sp_Collect'. " which appears at the last line when | call the cm.ExecuteScalar . The sp takes an int ID...
1
by: karenkksh | last post by:
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.