Win a copy of Secure Financial Transactions with Ansible, Terraform, and OpenSCAP this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Rob Spoor
  • Henry Wong
  • Liutauras Vilda
Saloon Keepers:
  • Tim Moores
  • Carey Brown
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
Bartenders:
  • Frits Walraven
  • Himai Minh
  • Jj Roberts

trouble using string in query (Java & MS Access)

 
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 182
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Bartender
Posts: 1111
Eclipse IDE Oracle VI Editor
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
So I left, I came home, and I ate some pie. And then I read this tiny ad:
SKIP - a book about connecting industrious people with elderly land owners
https://coderanch.com/t/skip-book
reply
    Bookmark Topic Watch Topic
  • New Topic