Ask a Question related to Coldfusion - Getting Started, Design and Development.
-
Roderick Rutlidge #1
Can you spot the syntax error?
<cfquery datasource="#VARIABLES.Datasource#">
INSERT INTO Blogs (
Subject, DateTime, Body, UserName)
VALUES (
'#Form.Subject#', <CFQUERYPARAM CFSQLTYPE="CF_SQL_TIMESTAMP"
VALUE="#DateFormat(Now())# #TimeFormat(Now())#">,
'#Form.Body#',
'#VARIABLES.UserID#')</cfquery>
Why is this throwing a syntax error?
Roderick Rutlidge Guest
-
Syntax error
I posted a question or two on this recently, and posts have been helpful. However, I have a new problem, and don't know what to do. To recap.... -
Help on Syntax error please
I'm new to MySQL. Sorry for asking for some probably very basic help. :( The following code is from a Dump of a php forums database (openBB... -
Syntax error?
Hi, I'm developing an ASP.NET web application with MySql 5. I have a little problem: if i create a stored procedure like this one: CREATE... -
error : syntax error at or near $1 for over select rows
This is the error i am getting when calling select * from cas_reset_qi_changedate('CAS','2003-02-03' ERROR: syntax error at or near "$1" at... -
syntax error ???
Hi, on login.php , we can see that : (...) $sql = "SELECT Login FROM logins WHERE Login='$fusername'"; $result = mysql_query($sql) or... -
allen@oysterweb.com #2
Re: Can you spot the syntax error?
What exactly is the error? When debugging is on, is there any more
details.
One item that jumps out is the DateTime field. Try using
#CreateODBCdatetime(Now())# instead.
allen@oysterweb.com Guest
-
Roderick Rutlidge #3
Re: Can you spot the syntax error?
<allen@oysterweb.com> wrote in message
news:1128011017.446435.114670@g49g2000cwa.googlegr oups.com...> What exactly is the error? When debugging is on, is there any more
> details.
>
> One item that jumps out is the DateTime field. Try using
> #CreateODBCdatetime(Now())# instead.
>
Error Executing Database Query.
[Macromedia][SequeLink JDBC Driver][ODBC Socket][Microsoft][ODBC Microsoft
Access Driver] Syntax error in INSERT INTO statement. The error occurred
in C:\CFusionMX\wwwroot\site\blog\submitentry.cfm: line 14
12 : INSERT INTO Blogs (Subject,DateTime,Body,UserName)
13 : VALUES
14 : ('#Form.Subject#',<CFQUERYPARAM CFSQLTYPE="CF_SQL_TIMESTAMP"
VALUE="#DateFormat(Now())#
#TimeFormat(Now())#">,'#Form.Body#','#VARIABLES.Us erID#')
15 : </cfquery>
16 : our blog has been successfully submitted. To view or edit any of your
entries, <a href="editentries.cfm">click here</a>.
--------------------------------------------------------------------------------
SQL INSERT INTO Blogs (Subject,DateTime,Body,UserName) VALUES
('test', (param 1) ,'test','test')
DATASOURCE blog
VENDORERRORCODE -3502
SQLSTATE 42000
Roderick Rutlidge Guest
-
Roderick Rutlidge #4
Re: Can you spot the syntax error?
<allen@oysterweb.com> wrote in message
news:1128011017.446435.114670@g49g2000cwa.googlegr oups.com...Nevermind, problem solved. DateTime is a reserved word. Special thanks to> What exactly is the error? When debugging is on, is there any more
> details.
>
> One item that jumps out is the DateTime field. Try using
> #CreateODBCdatetime(Now())# instead.
>
Bob Dively from alt.comp.lang.coldfusion
Roderick Rutlidge Guest



Reply With Quote

