By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,490 Members | 1,791 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,490 IT Pros & Developers. It's quick & easy.

What are some reserved names for Access?

Expert 100+
P: 449
I was working in a online inventory application for my client....
I had a Access which there was a few tables.....

In one of my tables i had columns like PurchaseDate, ExpiryDate, ItemName, ItemCode, ItemBarCode, Size, Shape, Make, Color, Qty...etc
I passed a simple insert query to insert values to these fields....

Every time i click on Submit button i used to get error message as Syntax Error in insert into statement...

I sat for 2 hrs....try fixing seemed that there's nothing wrong with the insert statement....
Database connection was perfect...
After 1 hr of debugging in all sorts of ways ....the error was the same...

Now The table had 21 columns.....and i wrote insert statements for each column one by one....
and came to a conclusion that insert statement works absolutely fone on other columns..except the Size column...Now how was it happening ..i don't know....
Then i changed the column name in the database to ISize....and Wola everything was fine.....

Now i understood that Size is a reserved word and i can't use it...
other reserved words i found out are Name, Level...

And Lets see how much you can find......@!!@$#%#
Aug 3 '09 #1
Share this Question
Share on Google+
3 Replies

Expert Mod 5K+
P: 5,389
to avoid such issues it is good practice to create and use a naming-convention while building the database. you might use a prefix like 'tbl' for tables, 'fld' for fields and similar ... so your tables would have names like:

Expand|Select|Wrap|Line Numbers
  1. tblItems
  2. tblWhatever
  3. tblSize
  4. tblDate
while the fields for tblItems could be:

Expand|Select|Wrap|Line Numbers
  1. fldFoo
  2. fldBar
  3. fldFooBar
  4. fldDate
  5. fldSize
Aug 6 '09 #2

Expert 100+
P: 449
That's purely correct on your part.......I'm too a big convention fan....
But, my employer or my boss is a primitive FOXPRO programmer....
Doesn't know RDBMS....doesn't know OOPS....wants everything simple understand...
That's the thing???

My fate.....
Aug 6 '09 #3

Expert Mod 5K+
P: 5,389
even a boss should/could be convinced to use a good convention ... especially when it helps AND is easy to understand ... tbl-, fld-prefixes for example doesn't make things more complicated nor does it make 'names' less readable ... btw. i think you got the point :)

kind regards
Aug 7 '09 #4

Post your reply

Sign in to post your reply or Sign up for a free account.