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 |
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 Larry Olson wrote in message <[hidden email]>... >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 |
In reply to this post by Larry Olson
Larry Olson <[hidden email]> wrote in message
news:[hidden email]... > 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 |
Hello all,
> 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. [hidden email] |
In reply to this post by Christopher J. Demers
"Christopher J. Demers" <[hidden email]> wrote in message news:<9uje9i$939da$[hidden email]>...
> Larry Olson <[hidden email]> wrote in message > news:[hidden email]... > > 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 |
Free forum by Nabble | Edit this page |