Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > .NET > Other .NET > ADO.NET
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
ADO.NET For discussion about ADO.NET.  Topics such as question regarding the System.Data namespace are appropriate.  Questions specific to a particular application should be posted in a forum specific to the application .
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ADO.NET section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old April 8th, 2004, 12:22 PM
Registered User
 
Join Date: Apr 2004
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to dispickle Send a message via Yahoo to dispickle
Default Syntax error in query. Incomplete query clause.

Pardon my ignorance, but I am trying to update a database table, and have tried to use the book to help me, and I've typed everything exactly as it's shown (except for my DB variables that I've changed) but it's erroring telling me the following:

Exception Details: System.Data.OleDb.OleDbException: Syntax error in query. Incomplete query clause. Line 21.

Line 19:
Line 20: oCmd = New OleDbCommand(sSQL, oConn)
Line 21: oCmd.ExecuteNonQuery()
Line 22:
Line 23: lblStatus.Text = "Command Run"

My code is pretty simple (I think) What is wrong with the syntax of the oCmd.ExecuteNonQuery() command?

-If seeing the entire code would be more helpful I can provide.

Thank you VERY much in advance.

J
Reply With Quote
  #2 (permalink)  
Old April 8th, 2004, 01:28 PM
Authorized User
 
Join Date: Mar 2004
Location: Austin,TX, USA .
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Default

My guess is that the SQL string is incomplete. What is the value of sSQL when you execute oCmd? That could tell you what the "Incomplete query clause" error is from. Perhaps just a little bit more of this code would be helpful.

Reply With Quote
  #3 (permalink)  
Old April 9th, 2004, 11:18 PM
Friend of Wrox
Points: 3,558, Level: 25
Points: 3,558, Level: 25 Points: 3,558, Level: 25 Points: 3,558, Level: 25
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: California, USA
Posts: 996
Thanks: 2
Thanked 11 Times in 11 Posts
Send a message via Yahoo to melvik
Default

yes more codes will sure help us to help.

Always:),
Hovik Melkomian.
Reply With Quote
  #4 (permalink)  
Old April 16th, 2004, 01:04 PM
Registered User
 
Join Date: Apr 2004
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Post your SQl query clause please!

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Syntax error using request.getParameter in query tutterrow JSP Basics 1 August 24th, 2006 02:13 PM
update query error in from clause prasath15@yahoo.co.in Classic ASP Databases 1 June 6th, 2005 06:02 AM
Syntax Error in Report Query mateenmohd Access 3 May 1st, 2005 03:41 AM
Syntax Error /missing operator in Query Expression dsealer Classic ASP Databases 4 September 4th, 2004 07:19 PM
Syntax error (missing operator) in query expressio mvollmer Classic ASP Databases 7 December 5th, 2003 11:38 AM



All times are GMT -4. The time now is 11:39 PM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.