473,587 Members | 2,548 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

What are some reserved names for Access?

ThatThatGuy
449 Recognized Expert Contributor
I was working in a online inventory application for my client....
I had a Access database......i n 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 2692
gits
5,390 Recognized Expert Moderator Expert
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 Recognized Expert Contributor
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 Recognized Expert Moderator Expert
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
2391
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
12362
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 file I import. Unfortunately, I have no control over the column names and the data provider has chosen to use the word "USE" as a column name. "USE"...
17
3809
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 using the dataAdapter.update sub, I get an error. The problem seems to be that one of the fields was named 'desc' which is a reserved word for...
7
2165
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 search_vectorspace where threshold > 0 order by threshold desc; I've tried it both with and without an AS alias, but in both instances pgsql complains that...
31
3233
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 definition but class followed by equals is a simple assignment?
3
6043
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 used the field in a calculated control, i.e... =Trim() ... the control would display the name of the form. Error in help documentation?
8
3359
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 member variables: foo_ m_foo _foo
4
1789
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. I think the following is allowed: struct foo { unsigned char *memory;
8
17764
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 database - the design of the database is very simple. I should also note that I ran the "compact and repair database" tool and I am still getting...
0
7920
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7849
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8215
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7973
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6626
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5394
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3844
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3879
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1454
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.