wood burning stoves 2.0*
The moose likes JDBC and the fly likes Statement stmt SQL syntax error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Statement stmt SQL syntax error" Watch "Statement stmt SQL syntax error" New topic
Author

Statement stmt SQL syntax error

James Howerton
Ranch Hand

Joined: Mar 14, 2009
Posts: 82
Could someone look at my Statement stmt? is this error due to improper string creation?
Thanks












[moderator fixed BB Codes in this post]
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

I'm not particularly familiar with the format of the CREATE TABLE command, especially since I have never ever had to write Java code to create a table, but without actually looking it up, that doesn't appear to me to be the right way to declare the primary key. Just doesn't seem right.

You didn't tell us which of the "(" characters is at position 149. We could copy the command and paste it into a text editor and count the characters, but then so could you.
James Howerton
Ranch Hand

Joined: Mar 14, 2009
Posts: 82
Thanks
In MySQL it seems to can read the primary key like that but I used the alternative and it passed. Thanks for explaining how that error was working I didn't to count the characters to find the error.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Statement stmt SQL syntax error
 
Similar Threads
Auto Increment ID Field Table in the Oracle Database
HSQLDB - user lacks privilege or object not found
Using Visual Web JavaServerFaces to display db data in a table
Mysql query
Error while inserting data through procedure