Problem with Update statement.

mike55

Well-known member
Joined
Mar 26, 2004
Messages
726
Location
Ireland
Hi all

I have the following update statement for a MS Access database, and I am getting an error with it.

Code:
"UPDATE HerdDetails SET HerdNumber = 12345ABC, HerdOwner = adsf, Address1 = adje, Address2 = jaf, Town =  nadsf, State/County = oasdfn, Country = 1, Phone = 012313, Email = 0203123@Adsf.com WHERE Reference = 1;"

Would appreciate it if anyone spotted the error could point it out. Table name and column names and types are correct.

Mike55.
 
Whenever you have tables or columns named with reserved words or invalid characters, you need to wrap the names in brackets. In your case, the column State/County will need to be [State/County]. It wont hurt to wrap them all, though you may just want to wrap those that are necessary.

-ner
 
Back
Top