Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8865971
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T16:39:49+00:00 2026-06-14T16:39:49+00:00

Am I missing something silly here? String update = UPDATE Patients SET fullName =

  • 0

Am I missing something silly here?

String update = "UPDATE Patients SET fullName = '" + patient.getName() + "', 
                 houseNum = '" + patient.getHouseNum() + "', 
                 address = '" + patient.getAddress() +"', 
                 postCode = '" + patient.getPostCode() + "', 
                 condition = '" + patient.getCondition() +  "', 
                 who = '" + patient.getWho() + "', 
                 time = '" + patient.getTime() + "', 
                 location = '" + patient.getLocation() + "', 
                 actionTaken = '" + patient.getActionTaken() + "', 
                 duration = '" + patient.getDuration() + "' 
                 WHERE regNo = '" +patient.getNHSnum()+"'";

For the sake of it, I returned on each new line for formatting here. Within my file it’s on a single line. All database fields are of type text.

The error I get is:

[Microsoft][ODBC Microsoft Access Driver] Syntax error in UPDATE statement. -3503

EDIT:

For info, the following works ok:

String update = "UPDATE Patients SET fullName = '" + patient.getName() + "', 
                houseNum = '" + patient.getHouseNum() + "', 
                address = '" + patient.getAddress() +"', 
                postCode = '" + patient.getPostCode() + "', 
                condition = '" + patient.getCondition() +  "' 
                WHERE regNo = '" +patient.getNHSnum()+"'";

EDIT2:

Here is the update string in full:

UPDATE Patients SET fullName = 'Dave', houseNum = '5', address = 'Bla', postCode = 'PQ1 RS2', condition = 'Unknown', who = 'Test', time = 'Test1', location = 'Test2', actionTaken = 'Test3', duration = 'Test4' WHERE regNo = '1'

As I said, in this example, every field in the database is of type text

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T16:39:51+00:00Added an answer on June 14, 2026 at 4:39 pm

    time is an SQL reserved word. Best is to rename it, otherwise it is often a vendant dependant quoting, deviating from standard SQL.

    Fully agree with the PreparedStatement remarks.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm sure I'm missing something silly, here is my code: public class clearBlankGrid {
I seem to be missing something silly here. int main() { /* bitset<sizeof(int)*8> bisetInt(64);
I must be missing something silly here. I have this: case class Color(val rgb:Int)
This is probably something silly I'm missing but I'm definitely lost. I'm using .NET
Probably missing something completely obvious here, but here goes. I'm starting out with Spring
Must be missing something really obvious here but how do you change the size
I think I'm missing something really obvious here... must be... but for some reason
I sense that I am doing something silly, but here is the issue: Function
I'm clearly missing something here. I need to fill methods of dynamic AS3 class
I may be missing something silly. But I've been staring at it for a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.