• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Java not recognising SQL statements to retrieve data from database

 
mithesh raj
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which error is that? In which line of code does it occur?
 
mithesh raj
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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%' ''.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic