jQuery in Action, 2nd edition
The moose likes JDBC and the fly likes Java not recognising SQL statements to retrieve data from database Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Databases » JDBC
Reply Bookmark "Java not recognising SQL statements to retrieve data from database" Watch "Java not recognising SQL statements to retrieve data from database" New topic
Author

Java not recognising SQL statements to retrieve data from database

mithesh raj
Greenhorn

Joined: Nov 04, 2012
Posts: 10
Hi all, I have a problem with my Java application. The application is based on users who have to enter their username (their email address) so as to fill in an input form. The functionality of the input form is that the user has to enter for book names in order of priority. In the application, suppose a user's email address is "david.ferno@gmail.com"....he will have to input only "david.ferno" in the JTextBox...and a SQL LIKE statement is used check the corresponding User ID from the "bookuser" table and store it into the "priority" table along with the book priority choices.

The issue is that everytime java is displaying syntax error. I can't figure out where is my mistake...please help.

Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 35237
    
    7
Which error is that? In which line of code does it occur?


Android appsImageJ pluginsJava web charts
mithesh raj
Greenhorn

Joined: Nov 04, 2012
Posts: 10
Here is the error appearing>>>

Error: java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in query expression ''SELECT User_ID FROM bookuser WHERE email_address Like 'david.ferno%' ''.
 
I agree. Here's the link: http://zeroturnaround.com/jrebel
 
subject: Java not recognising SQL statements to retrieve data from database
 
Similar Threads
Sample maintenance disply
problem with actionEvent command
Text boxes over an image
Need assistant in placing random number generator for my codes. Help...please..
TEXTFIELDS TO INT