with the date going in, more like the database itself
Error Diagnostic Information
ODBC Error Code = 37000 (Syntax error or access violation)
[Microsoft][ODBC SQL Server Driver]Syntax error or access violation
SQL = "insert into fundpreviousds { thisday, fundid, fundvalue,
timeofchange } values { ?, ?, ?, ? }"
Query Parameter Value(s) -
Parameter #1 = 1
Parameter #2 = 3
Parameter #3 = 5
Parameter #4 = {ts '2004-03-22 11:55:33'}
Data Source = "FUNDMANAGER"
The error occurred while processing an element with a general identifier
of (CFQUERY), occupying document position (27:2) to (27:57) in the
template file
D:\INETPUB\WWWROOT\FUNDMANAGER\ADMIN\FUND\ACT_UPDATESTOCK.CFM.
-----Original Message-----
From: Pascal Peters [mailto:[EMAIL PROTECTED]
Sent: 22 March 2004 11:43
To: CF-Talk
Subject: RE: db error
He uses SQL Server over ODBC (it's in the error message). Doing what you
suggest will not work here, because he needs the time (maybe date &
time) and not the date. Now() returns date & time in ODBC format!
I have no idea what is going wrong, but try using <cfqueryparam to
eliminate any data problem. I'm not saying this will solve your problem,
but you should use it anyway
Pascal
> -----Original Message-----
> From: Declan Maher [mailto:[EMAIL PROTECTED]
> Sent: maandag 22 maart 2004 12:32
> To: CF-Talk
> Subject: RE: db error
>
> Could be a number of reasons. What database are you using?
>
> Try
>
> <cfquery name="update_funds" datasource="#request.dsn#">
> insert into fundprevious
> {
> thisday,
> fundid,
> fundvalue,
> timeofchange
> }
> values
> {
> #thisfundday#,
> #get_funds.fundid#,
> '#previousValue#',
> #CreateODBCDate( Now())#
> }
> </cfquery>
>
>
> -----Original Message-----
> From: David Ashworth [mailto:[EMAIL PROTECTED]
> Sent: 22 March 2004 11:29
> To: CF-Talk
> Subject: db error
>
>
> Morning,
>
>
> I keep getting the following error when trying to update a
> database, haven't had any problems when doing this before but
> this error is peristent and I can't work out what the problem is:
>
>
> It appears to be a problem with the query as opposed to the
> data, the query is as follows:
>
> <!--- save current value into previous value ---> <cfquery
> name="update_funds" datasource="#request.dsn#">
> insert into fundprevious
> {
> thisday,
> fundid,
> fundvalue,
> timeofchange
> }
> values
> {
> #thisfundday#,
> #get_funds.fundid#,
> '#previousValue#',
> #Now()#
> }
> </cfquery>
>
> which gives this error:
>
>
> ODBC Error Code = 37000 (Syntax error or access violation)
>
> [Microsoft][ODBC SQL Server Driver]Syntax error or access violation
>
> SQL = "insert into fundprevious { thisday, fundid, fundvalue,
> timeofchange } values { 1, 3, '5', {ts '2004-03-22 11:28:38'} }"
>
> Data Source = "FUNDMANAGER"
>
> The error occurred while processing an element with a general
> identifier of (CFQUERY), occupying document position (27:2)
> to (27:57) in the template file
> D:\INETPUB\WWWROOT\FUNDMANAGER\ADMIN\FUND\ACT_UPDATESTOCK.CFM.
>
> any thoughts?
> _____
>
>
>
>
_____
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

