Problem with reserved words in column names. 
Author Message
 Problem with reserved words in column names.

I've found that I'm unable to insert a record into a table because of
the column name (TimeStamp).  Does Dolphin check for reserved words in
column names when it is executing an insert statement, or am I missing
something even more important?
I'm reasonable new to Dolphin so if this is something that should be
obvious I would appreciate understanding why.

The following example does not work when run from the workspace -
db exec: ('Insert into Tests (TimeStamp, Division1, Division1Value)
values (''12/03/2001'', ''State'', ''NM'')')

While both of these do -
db exec: ('Insert into Tests (Division1, Division1Value) values
(''State'', ''NM'')')
db exec: ('Insert into Tests (TimeStamps, Division1, Division1Value)
values (''12/03/2001'', ''State'', ''NM'')')
(when column name is changed to TimeStamps in Tests table)

I'm using Access2000 for my database and Restore to store the data.

TIA,
Larry



Sun, 23 May 2004 01:50:00 GMT  
 Problem with reserved words in column names.
Larry,
    TIMESTAMP is a reserved word in ACCESS 2000 SQL.
    When you create an Access table it will allow you to name a field, using
a reserved word, but when you try to insert/update the table through Dolphin
or any other language it will not allow you to do it.  It once took me 3
weeks to locate a similar problem.

    Ron


Quote:
>I've found that I'm unable to insert a record into a table because of
>the column name (TimeStamp).  Does Dolphin check for reserved words in
>column names when it is executing an insert statement, or am I missing
>something even more important?
>I'm reasonable new to Dolphin so if this is something that should be
>obvious I would appreciate understanding why.

>The following example does not work when run from the workspace -
>db exec: ('Insert into Tests (TimeStamp, Division1, Division1Value)
>values (''12/03/2001'', ''State'', ''NM'')')

>While both of these do -
>db exec: ('Insert into Tests (Division1, Division1Value) values
>(''State'', ''NM'')')
>db exec: ('Insert into Tests (TimeStamps, Division1, Division1Value)
>values (''12/03/2001'', ''State'', ''NM'')')
>(when column name is changed to TimeStamps in Tests table)

>I'm using Access2000 for my database and Restore to store the data.

>TIA,
>Larry



Sun, 23 May 2004 04:24:55 GMT  
 Problem with reserved words in column names.

Quote:
> I've found that I'm unable to insert a record into a table because of
> the column name (TimeStamp).  Does Dolphin check for reserved words in
> column names when it is executing an insert statement, or am I missing
> something even more important?
...
> I'm using Access2000 for my database and Restore to store the data.

I am a little surprised that ReStore is using a field named TimeStamp.  I am
also using ReStore with MS Access, and I also have an instance variable
named timeStamp, but ReStore converted it to TIME_STAMP.  I guess that is
because of my use of case.  However ReStore is supposed to append _FIELD to
the end of a field name if it is a reserved word.  You might make sure that
your SSWSQLDialect object is properly configured.

Chris



Sun, 23 May 2004 05:13:09 GMT  
 Problem with reserved words in column names.
Hello all,

Quote:
> I am a little surprised that ReStore is using a field named TimeStamp.  I
am
> also using ReStore with MS Access, and I also have an instance variable
> named timeStamp, but ReStore converted it to TIME_STAMP.  I guess that is
> because of my use of case.  However ReStore is supposed to append _FIELD
to
> the end of a field name if it is a reserved word.  You might make sure
that
> your SSWSQLDialect object is properly configured.

On the simple-minded end, is there a way to use single or double quotes on
the field name to fix it?

Have a good one,

Bill

--
Wilhelm K. Schwab, Ph.D.



Sun, 23 May 2004 05:48:10 GMT  
 Problem with reserved words in column names.

Quote:


> > I've found that I'm unable to insert a record into a table because of
> > the column name (TimeStamp).  Does Dolphin check for reserved words in
> > column names when it is executing an insert statement, or am I missing
> > something even more important?
>  ...
> > I'm using Access2000 for my database and Restore to store the data.

> I am a little surprised that ReStore is using a field named TimeStamp.  I am
> also using ReStore with MS Access, and I also have an instance variable
> named timeStamp, but ReStore converted it to TIME_STAMP.  I guess that is
> because of my use of case.  However ReStore is supposed to append _FIELD to
> the end of a field name if it is a reserved word.  You might make sure that
> your SSWSQLDialect object is properly configured.

> Chris

I want to thank all of you for your responses, and come to the defense
of Restore.  I included that reference on the off-chance that it might
have an impact on what I was doing, but actually the insert statement
above was associated with a table that was unrelated to the data that
Restore is managing. In the end I confirmed Ron's initial comment
(Access may let you name a column using one of their reserved words,
but it won't let you do anything via SQL with that column).

Larry



Mon, 24 May 2004 03:59:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. COBOL "reserved columns" (was: Philosophical question

2. Reserved words in JCL

3. PB 3.5 Reserved Words List?

4. Obtaining a list of Clarion Reserved Words

5. Reserved word ?

6. CW4 - Reserved Words

7. xbase to clarion with reserved word as xbase variable

8. Reserved Words (2)

9. Reserved words

10. 359 Reserved Words and No Syntax

11. Reserved Words and Functions

12. VO2 - BEWARE Reserved words!

 

 
Powered by phpBB® Forum Software