This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JDBC and the fly likes sql exception Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "sql exception " Watch "sql exception " New topic
Author

sql exception

Aarthi moorthy
Greenhorn

Joined: Feb 24, 2003
Posts: 7
hi all,
I am updating a table with a set of values.
My code is

st.executeUpdate("update bulletinboard set (userid='"+s1+"',dateofposting='"+s2+"',messagetitle='"+s3+"',message='"+s4+"', administratorid='"+s5+"',typeofmessage='"+s6+"',expirydate='"+s7+"') where messageid=2");
I get an error as

java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in query expression 'messageid='.
Plz give me ur solutions..
Thanks in advance.
regards,
Aarthi.
Kirtikumar Puthran
Ranch Hand

Joined: Mar 04, 2003
Posts: 37
Hi Aarthi,
Try this :
st.executeUpdate("update bulletinboard set (userid='"+s1+"',dateofposting='"+s2+"',messagetitle='"+s3+"',message='"+s4+"', administratorid='"+s5+"',typeofmessage='"+s6+"',expirydate='"+s7+"') where messageid='2'");
I have changed the where clause.
Hope this helps.
Rgds,
Kirtikumar Puthran


Regards,<br />Kirti
 
wood burning stoves
 
subject: sql exception
 
Similar Threads
Correctly handling javax.resource.spi.UnavailableException in an Inbound Connector
How to Support a Codepage
SQL Error!!
need java code for xmlbeans
NameNotFoundException: MSAccessDS not bound