File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

trouble using string in query (Java & MS Access)

 
Brendan Cregan
Ranch Hand
Posts: 35
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,


I have made a quiz servlet program and here I am trying to check if a user is there, then check their previous score, the else statement is working to create a new user in the DB if no score is present.
I'm convinced it has something to do with my syntax, but can't figure out what it is, as I have similar Queries at other sections of my servlet that are working fine.



Thanks for any help,

Brendan
 
Fatih Keles
Ranch Hand
Posts: 182
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Brendan,

Can you please use proper setXXX methods for sql statements? It is not that hard and saves a lot of time when passing values to queries Here you can start.

Regards,
Fatih.
 
Wendy Gibbons
Bartender
Posts: 1107
Eclipse IDE Oracle VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Brendan Cregan wrote:Hi All,


I have made a quiz servlet program and here I am trying to check if a user is there, then check their previous score, the else statement is working to create a new user in the DB if no score is present.
I'm convinced it has something to do with my syntax, but can't figure out what it is, as I have similar Queries at other sections of my servlet that are working fine.

Thanks for any help,

Brendan


what happens if the user exists but doesn't have a previous score.
But as you haven't told us what the actual problem is, I am just guessing.

[wg] edited to move my questions outside the quote.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic