This week's book giveaway is in the Big Data forum.
We're giving away four copies of Elasticsearch in Action and have Radu Gheorghe & Matthew Lee Hinman on-line!
See this thread for details.
The moose likes JDBC and Relational Databases and the fly likes Getting a SQL  Exception ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Elasticsearch in Action this week in the Big Data forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Getting a SQL  Exception ?" Watch "Getting a SQL  Exception ?" New topic

Getting a SQL Exception ?

lakmal padmakumara
Ranch Hand

Joined: Aug 08, 2009
Posts: 47

Hey Friends , I'm getting an error which is mentioned below when i run my programme !!

I know something wrong with my sql query .But Cannot figure it out !!!I have attached my sql database also .It does not contain any data .Only a Table .I have been checking this for nearly 7 hours using tutorials and other internet stuff.If you can please give me a help !!

My SQL Db is here

[Bsc in Computer Science and Engineering] [SCJP 80%][BCS certificate level]
Vijitha Kumara

Joined: Mar 24, 2008
Posts: 3870

As the exception says error is in your SQL:

After the "VALUES" clause you should have only one (opening) round bracket and one at the end (closing round bracket). It should not have any in between.

[How to ask questions] [Twitter]
lakmal padmakumara
Ranch Hand

Joined: Aug 08, 2009
Posts: 47
Hey Friends , I found it !!! From Java Ranch ,

The insert into code should be changed as

It is sorta covered in the JavaRanch Style Guide.
subject: Getting a SQL Exception ?