your insert statement looks ok by itself,  you may want to look at the data
being passed.
How are the fields in your table set up,  do you allow zero length strings,
if not are you checking for validation before passing the data? you could
look at the date field,  in the code you are not formatting the date,  what
type of field is it in the database table?   date or text,  if its date,
will need to make sure the formatting matches.
Are your two id fields text or number? If they are text then you could add
the single quotes around the variables.

If any of the fields are index,  make sure Duplicates are OK.
Hope this helps

-----Original Message-----
From: Jay Patton [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 11, 2001 12:33 PM
To: CF-Talk
Subject: insert help


.....quick question...

does anyone see anything wrong w/ this insert statement?

<cfset fileName = File.ServerFile>
<cfset ArtistID = Form.ArtistID>
<cfset TypeID = Form.TypeID>
<cfset ArtName = Form.RealName>
<cfset Price = Form.PriceFrame>
<cfset Date = Form.Date>
  
<cfquery name="AddImage"
         datasource="catlingalleries"
         dbtype="ODBC">
INSERT INTO OtherImages (SmallImage, ArtistID, TypeID, ArtName, Price, Size,
Date)
VALUES ('#fileName#', #ArtistID#, #TypeID#, '#RealName#', '#Price#',
'#Size#', '#Date#')
</cfquery>


this is the error i get:

Error Diagnostic Information
ODBC Error Code = 37000 (Syntax error or access violation) 


[Microsoft][ODBC Microsoft Access Driver] Syntax error in INSERT INTO
statement. 



The error occurred while processing an element with a general identifier of
(CFQUERY), occupying document position (41:1) to (43:23).


Date/Time: 04/11/01 13:29:49
Browser: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)


Thanks in advance,

Jay Patton
Web Design / Application Design
Web Pro USA
p. 406.549.3337 ext. 203
p. 1.888.5WEBPRO ext. 203
e. [EMAIL PROTECTED]
url. www.webpro-usa.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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