Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > ADO.NET
| 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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #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
  #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.

  #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.
  #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!



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





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