Reputation: 62424
i need to connect to customer database in access that contains field with the char '
he has field: PartNo'
i try to run this query: select PartNo' from myTable
and got error.
(i connect to the database and run query Through C#)
how i can Solve this problem ? (i can't change the customer table's and field's)
thank's in advance
Upvotes: 1
Views: 415
Reputation: 12604
put brackets around the table or field name:
select [PartNo'] from myTable
In some other SQL dialects it's double quotes:
select "PartNo'" from myTable
In still other dialects, you can use backquotes:
select `PartNo'` from myTable
Hopefully one of these works for you.
Upvotes: 5