File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases and the fly likes an SQLException Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "an SQLException" Watch "an SQLException" New topic

an SQLException

bab javier
Ranch Hand

Joined: Aug 12, 2003
Posts: 32
i'm using a JSP to INSERT to an MS Access DB. Problem is i get an exception:
javax.servlet.jsp.JspTagException: Error executing "
VALUES(michelle, (String)
mich, (String)
35,(int), (String)
": java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in query expression ''.
i don't understand the "missing operator" thing.
Also, when i deleted the value for the email address as well as the email field in the DB, i get this error "Too few parameters. Expected 4". I don't get it

thanks in advance guys!
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63844

Moving this to the JDBC forum since the fact that this is being performed from a JSP is moot.

[Asking smart questions] [About Bear] [Books by Bear]
Nagendra Prasad
Ranch Hand

Joined: Jul 11, 2002
Posts: 219
It is to do with the '@' sign... you need to escape it properly.

Best Regards,<br />Nagendra Prasad.
I agree. Here's the link:
subject: an SQLException
It's not a secret anymore!