Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Insert into problem

Status
Not open for further replies.

fiep

Technical User
Sep 2, 2003
66
NL
Hi,

I hope somebody can help me with my insert problem. I have this table called tbl_currency and one of the fields is called currency (not to smart I know).

I want to add a new currency by executing an insert statement:
INSERT INTO tbl_currency (currency) values ('" & var$ & "');"

This statement does not work becuase of the reserved word currency. So I changed it to:
INSERT INTO tbl_currency ('currency') values ('" & var$ & "');"

Now I get the following error: 3127
The statement contains the following unknown fieldname: currency blah blah.

I am sure I typed the name correctly so the field does exist.

Anybody know how to solve this?

Thanks in advance.

W.
 
Have you tried this ?
INSERT INTO tbl_currency (tbl_currency.currency) VALUES ...

Hope This Help, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884
 
I already tried that but it did not work to bad.
I found a solution though:
INSERT INTO tbl_currency ([currency]) values ('" & var$ & "');"

is the correct syntax.

Thanks for the suggestion.

W.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top