Page 1 of 1
Strange tendency in MS Access?
Posted: Sat May 27, 2006 5:03 pm
by erupt
I'm sure many people know that this happens .... but does anyone know why you're not allowed to have a column named "password" in any tables? You're allowed to create it in Access, but it always creates errors when using ADO.net to insert records, update etc.
Anyone know why that happens?
Posted: Sat May 27, 2006 5:15 pm
by hawleyjr
Password is a reserved word.
Can you add a hash around the field name?
`password`
Re: Strange tendency in MS Access?
Posted: Sat May 27, 2006 5:23 pm
by RobertGonzalez
erupt wrote:I'm sure many people know that this happens .... but does anyone know why you're not allowed to have a column named "password" in any tables? You're allowed to create it in Access, but it always creates errors when using ADO.net to insert records, update etc.
Anyone know why that happens?
Like hawley said, Password is reserved. Many database applications and management systems reserve words for the system that cannot be used as field names. MySQL has a table of reserved words on their website, so I would imagine that MSDN would have something similar.
Hawley, does Access accept backticks in queries? I thought Access uses brackets for field names ([tablename].[fieldname]). Just a thought, if backticks don't work try brackets.
Re: Strange tendency in MS Access?
Posted: Sat May 27, 2006 5:25 pm
by hawleyjr
Everah wrote:
Hawley, does Access accept backticks in queries? I thought Access uses brackets for field names ([tablename].[fieldname]). Just a thought, if backticks don't work try brackets.
Ha Ha, I have no idea that's why I said `try` (No pun intended on the hash markes used in try)
It's prob. been 6 years since I've even opened up Access

Posted: Sat May 27, 2006 5:36 pm
by erupt
I just tried creating a field with backticks. Access said absolutely not

Posted: Sat May 27, 2006 5:52 pm
by s.dot
Don't create the field with backticks.
Use it in your query.
Although, like everah said, msaccess uses brackets.. so try that.