Hello
I have fields "Account Name" and "Address" in an Access table "person" then
I use a query to insert a record:
"Insert INTO person (Address, Account Name) Values ('USA', 'John').
However there is error when I inserted this record.
My question is:
Can I use insert query for a field name that has a blank char. Im my case,
there is a blank char between "Account" and "Name".
Thank you for any help
S.Hoa
Steve W. Jackson - 28 Jun 2005 19:56 GMT
> Hello
>
[quoted text clipped - 10 lines]
> Thank you for any help
> S.Hoa
It's better not to use names with spaces in them. Most *real* database
engines don't allow it. But you can do so by putting escaped double
quotes around the names. So the literal string in your example above,
after adding the closing quote you left off, would be:
"Insert INTO person (Address, \"Account Name\") Values ('USA', 'John')"
= Steve =

Signature
Steve W. Jackson
Montgomery, Alabama
Virgil Green - 29 Jun 2005 18:55 GMT
> Hello
>
[quoted text clipped - 10 lines]
> Thank you for any help
> S.Hoa
What happened when you tried it?
Consider putting the name in brackets like [Account Name] though I don't
know if that will do it.

Signature
Virgil