This is some kind of database error.  It is impossible to tell what from
just having the code.

Frequently, these errors are caused by a duplicate value in a uniquely
constrained field.  Check with your DBA.

Brian

-----Original Message-----
From: Parker, Kevin [mailto:[EMAIL PROTECTED]]
Sent: Sunday, December 10, 2000 8:00 PM
To: CF-Talk
Subject: Syntax error


One of my apps is throwing a syntax error and I can't see what the problem
is - can anyone help please. Here is the error message - the actual code
follows.



Operation aborted due to an error in the database. This could be due to a
number of reasons:
Data in the record you are attempting to insert is in conflict with another
record.
There was an internal database error.
Below is the message returned from ColdFusion:
[Microsoft][ODBC Microsoft Access Driver] Syntax error in INSERT INTO
statement.

SQL = "INSERT INTO MikesNews( Available, From, Story, Title ) VALUES ( 1,
'Australia', 'Blah blah blah', 'Testing' )"

Data Source = "cfs_general"


+++++++++++++++++++++

<cfquery name="InsertMikesNews"
                        datasource="#application.main_dsn#"
                        username="#application.app_username#"
                        password="#application.app_password#"
                        dbtype="ODBC">
                INSERT INTO MikesNews(
                        Available,
                        From,
                        Story,
                        Title
                )
                VALUES (
                        <cfif Trim(Form.Available) EQ "">
                        NULL
                        <cfelse>
                        #Val(Form.Available)#</cfif>,
                        '#Trim(Form.From)#',
                        '#Trim(Form.Story)#',
                        '#Trim(Form.Title)#'

                )
                </cfquery>





********************************
Kevin Parker
Manager, Web Services
Service and Communication
WorkCover Corporation

[EMAIL PROTECTED]
www.workcover.com

ph:   +61 8 82332548
fax:  +61 8 82332000
mob: 0418 800 287
********************************




****************************************************************************
This e-mail is intended for the use of the addressee only. It may contain
information that is protected by legislated confidentiality and/or is
legally privileged. If you are not the intended recipient you are prohibited
from disseminating, distributing or copying this e-mail. Any opinion
expressed in this e-mail may not necessarily be that of the WorkCover
Corporation of South Australia. Although precautions have been taken, the
sender cannot warrant that this e-mail or any files transmitted with it are
free of viruses or any other defect.
If you have received this e-mail in error, please notify the sender
immediately by return e-mail and destroy the original e-mail and any copies.
****************************************************************************
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to