aspose file tools*
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 | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
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: 42601
    
  65
Which error is that? In which line of code does it occur?


Ping & DNS - my free Android networking tools app
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://aspose.com/file-tools
 
subject: Java not recognising SQL statements to retrieve data from database