|
-
May 5th, 2009, 11:39 PM
#1
Thread Starter
New Member
[RESOLVED] Table uses fields named SYSDATE and SYSTIME
I'm using VB6 to add records to an existing Progress database table which has 2 existing fields named SYSDATE and SYSTIME. Any attempt to use these names in the SQL "INSERT INTO" command causes a syntax error.
Any ideas? Also, when I try to examine these fields with MSQUERY I get a syntax error...thanks
-
May 5th, 2009, 11:44 PM
#2
Re: Table uses fields named SYSDATE and SYSTIME
Wrap them is brackets, although that usually applies to reserved words and I wasn't aware that those two were.
-
May 6th, 2009, 03:59 PM
#3
Thread Starter
New Member
Re: Table uses fields named SYSDATE and SYSTIME
Good call, the brackets didn't seem to work, but the reference to "reserved words" sent me to the MSDS site where they discussed using pairs of double quotes (") or pairs of single quotes (') around a reserved word. Neither SYSDATE nor SYSTIME were mentioned in the 100+ reserved workds for Microsoft - but perhaps they're reserved in the Progress Merant ODBC driver, so...
I wrapped the words in double quotes ""SYSDATE"", ""SYSTIME"", and it ran and the database was updated (Crystal Reports was the only database reader that would run and show the fields without a syntax error - too bad their SQL display didn't differentiate these fields from the other fields shown, but it was useful to see if the update was successfrul).
Once I got passed the syntax errors I got hung up on an "incorrect numeric value" error until I figured it out - so in the future if you run up against these 2 fields in your work, note that SYSTIME can be updated in seconds only.
Thanks for all your help, Stan
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|