vladislavn
vladislavn

Reputation: 388

Access: Invalid UPDATE statement

I'm trying to update a table in Access database. But when I debug I get the exception: "Invalid UPDATE statement". What's wrong with my statement:

string query = @"UPDATE Phone SET Name = ?, Number = ? WHERE ID = ?";

Upvotes: 1

Views: 254

Answers (1)

Fionnuala
Fionnuala

Reputation: 91306

Both number and name are reserved words, so shold be enclosed in brackets [Name].

Upvotes: 5

Related Questions