aspose file tools*
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
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: 18902
    
    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.
 
 
subject: Statement stmt SQL syntax error