0

/t5/coldfusion-discussions/syntax-error-in-insert-into-statement/td-p/931583
Apr 24, 2008
Apr 24, 2008
Copy link to clipboard
Copied
Hi, I have several form fields that are supposed to be
inserted into an Access database. Several of the values are dates,
which I created with dropdown menus that the users choose their
values from, and then I used the CreateDate/CreateTime function to
format them properly for Access date/time fields. However... I
can't seem to get past this error! I have checked to be sure that I
am not using any reserve words, and I don't think there are any
misplaced commas, etc., although I could have missed something. I
am guessing it has something to do with the date fields. I don't
have any specific formatting on them in Access. Please help! Thanks
:)
TOPICS
Getting started
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
1 Correct answer
Valorous Hero
,
Apr 25, 2008
Apr 25, 2008
semi star gazer wrote
Yes, everything matches up
I do not think so. Do your parenthesis match?
although I am not sure where the "1899-12-30" is coming from on the createTime
Have a look at the Access documentation. It explains the signifigance of 1899-12-30
http://msdn.microsoft.com/archive/default.asp?url=/archive/en-us/dnaraccess/html/msdn_datetime.asp
'#Trim(form.datestamp)# #Trim(form.timestamp)#
Unlike the other form values, you are passing in the date and time stamp as a string. Why...
Yes, everything matches up
I do not think so. Do your parenthesis match?
although I am not sure where the "1899-12-30" is coming from on the createTime
Have a look at the Access documentation. It explains the signifigance of 1899-12-30
http://msdn.microsoft.com/archive/default.asp?url=/archive/en-us/dnaraccess/html/msdn_datetime.asp
'#Trim(form.datestamp)# #Trim(form.timestamp)#
Unlike the other form values, you are passing in the date and time stamp as a string. Why...
LEGEND
,
/t5/coldfusion-discussions/syntax-error-in-insert-into-statement/m-p/931584#M85425
Apr 24, 2008
Apr 24, 2008
Copy link to clipboard
Copied
> INSERT INTO events ( eventName, eventDate,
eventStartTime, eventEndTime,
> location, contactInfo, details, eventURL, sponsor, runStart, runEnd,
> dateSubmitted ) VALUES ( 'asdf', {ts '2008-01-02 00:00:00'}, {ts '1899-12-30
> 07:05:00'}, {ts '1899-12-30 07:10:00'}, 'asdf', 'asdf', 'sdf', '', '', {ts
> '2008-01-02 00:00:00'}, {ts '2008-01-03 00:00:00'}, '04/24/2008 10:19:57 PM'
Look at the SQL it's trying to execute. Is it syntactically correct?
--
Adam
> location, contactInfo, details, eventURL, sponsor, runStart, runEnd,
> dateSubmitted ) VALUES ( 'asdf', {ts '2008-01-02 00:00:00'}, {ts '1899-12-30
> 07:05:00'}, {ts '1899-12-30 07:10:00'}, 'asdf', 'asdf', 'sdf', '', '', {ts
> '2008-01-02 00:00:00'}, {ts '2008-01-03 00:00:00'}, '04/24/2008 10:19:57 PM'
Look at the SQL it's trying to execute. Is it syntactically correct?
--
Adam
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

Guest
AUTHOR
/t5/coldfusion-discussions/syntax-error-in-insert-into-statement/m-p/931585#M85426
Apr 25, 2008
Apr 25, 2008
Copy link to clipboard
Copied
Yes, everything matches up, although I am not sure where the
"1899-12-30" is coming from on the createTime functions.
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Valorous Hero
,
/t5/coldfusion-discussions/syntax-error-in-insert-into-statement/m-p/931586#M85427
Apr 25, 2008
Apr 25, 2008
Copy link to clipboard
Copied
semi star gazer wrote
Yes, everything matches up
I do not think so. Do your parenthesis match?
although I am not sure where the "1899-12-30" is coming from on the createTime
Have a look at the Access documentation. It explains the signifigance of 1899-12-30
http://msdn.microsoft.com/archive/default.asp?url=/archive/en-us/dnaraccess/html/msdn_datetime.asp
'#Trim(form.datestamp)# #Trim(form.timestamp)#
Unlike the other form values, you are passing in the date and time stamp as a string. Why not use ParseDateTime instead?
Yes, everything matches up
I do not think so. Do your parenthesis match?
although I am not sure where the "1899-12-30" is coming from on the createTime
Have a look at the Access documentation. It explains the signifigance of 1899-12-30
http://msdn.microsoft.com/archive/default.asp?url=/archive/en-us/dnaraccess/html/msdn_datetime.asp
'#Trim(form.datestamp)# #Trim(form.timestamp)#
Unlike the other form values, you are passing in the date and time stamp as a string. Why not use ParseDateTime instead?
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

Guest
AUTHOR
/t5/coldfusion-discussions/syntax-error-in-insert-into-statement/m-p/931587#M85428
Apr 25, 2008
Apr 25, 2008
Copy link to clipboard
Copied
It was the parenthesis! Good call!
Also, I switched to ParseDateTime, and that is working as well. Thanks!
Also, I switched to ParseDateTime, and that is working as well. Thanks!
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

