Question

I assume that "Zone" is a reserved keyword, so can I put it in quotes or something to make this work? My DB connection is good. I've added columns with different names.

String addZone = ALTER TABLE Streets ADD COLUMN Zone Text(50)
OleDbCommand com1 = new OleDbCommand(q1, mdbConnection);
com1.ExecuteNonQuery();
Was it helpful?

Solution

Zone is a reserved keyword so you have to wrap it in brackets

String addZone = "ALTER TABLE Streets ADD COLUMN [Zone] Text(50)"
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top