473,395 Members | 1,568 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

What are some reserved names for Access?

ThatThatGuy
449 Expert 256MB
I was working in a online inventory application for my client....
I had a Access database......in 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 it...it 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
3 2678
gits
5,390 Expert Mod 4TB
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
ThatThatGuy
449 Expert 256MB
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 enough....to understand...
That's the thing???

My fate.....
Aug 6 '09 #3
gits
5,390 Expert Mod 4TB
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

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

Similar topics

12
by: Michael Foord | last post by:
Here's a little oddity with 'print' being a reserved word... >>> class thing: pass >>> something = thing() >>> something.print = 3 SyntaxError: invalid syntax >>> print something.__dict__...
2
by: Matthew Cascio | last post by:
My understanding is that using reserved words as column names is allowable as long as they are quoted. I am trying to create a table dynamically with columns defined by the first row of a text...
17
by: Benoit Martin | last post by:
I'm working on a project in VB.net connecting to a SQL Server 2000 database that I can't modify I created a dataset with a schema identical to the DB. When trying to update the DB from the dataset...
7
by: Stephen Howard | last post by:
I've got a moderately complex function defined which i then want to be able to test the value of, as well as select the value: select id, vector_cosine(document,'') as threshold from...
31
by: metaperl | last post by:
-- python -i File "<stdin>", line 1 class = "algebra" ^ SyntaxError: invalid syntax Why isn' t the parser smart enough to see that class followed by an identifier is used for class...
3
by: Robert | last post by:
I ask because, in Access help, it does not list is as such, however, I had a table with a field named 'Name'. If I put a control on a form and used this as the control source no problems, but if I...
8
by: Tim H | last post by:
I know C's rules about reserved identifiers (anything starting with "_", leading "is", etc). I don't know C++ rules. I assume the same rules and more apply? I've seen several conventions for...
4
by: Bas Wassink | last post by:
Hello all, I've been wondering about struct member names and reserved identifiers for some time now and I can't figure out whether the reserved identifier restrictions apply to struct members. ...
8
by: adampierce | last post by:
I am trying to run a pretty simple select query in Access 2007, and I keep getting the error message "Reserved error (-1524); there is no message for this error." There are no linked tables in the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.