Thank you Dan Haley and David Hayes!!
You have saved my day!

By using the debugging tool, I have found where
the extra commas appeared.  I also fixed a few
data type mismatch and it now works!

Just in case it interests anyone, here's the final working script:

<CFquery datasource="CSM">
  INSERT INTO Projects (ProjectID,ID,Done<cfloop
query="lang">,Description#lang.Abrev#,details#lang.Abrev#</cfloop>,Image,For
matImage)
  VALUES(#ProjectID#,#ID#,#Done#<cfloop query="lang"><CFSET
tempdesc=evaluate("Description#lang.Abrev#")><CFSET
tempdet=evaluate("details#lang.Abrev#")>,'#tempdesc# ','#tempdet#
'</cfloop>,'#Image#',#formatImage#)
  </cfquery>

Now I will go celebrate!
_____________________
Michael Gagnon


----- Original Message -----
From: "Dan Haley" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Friday, September 29, 2000 12:20 PM
Subject: RE: INSERT INTO with loop problem


> The commas inside your loop are going to cause problems.  You have
> <cfloop>,desc,details,</cfloop>.  Going through this loop will give you
> doubled up commas - ,desc,details,,desc,details,,desc,details,
>
> Dan
>
> -----Original Message-----
> From: Michael Gagnon [mailto:[EMAIL PROTECTED]]
> Sent: Friday, September 29, 2000 7:38 AM
> To: CF-Talk
> Subject: Re: INSERT INTO with loop problem
>
>
> What do you meen by outputing the SQL statements?
>
> Here's where I'm at now:
>
> <CFquery datasource="CSM">
>   INSERT INTO Projects (ProjectID,ID,Done
>   <cfloop
> query="lang">,Description#lang.Abrev#,details#lang.Abrev#,</cfloop>
>   Image,FormatImage)
>   VALUES(#ProjectID#,#ID#,#Done#,
>   <cfloop query="lang">
>   <CFSET tempdesc=evaluate('Description#lang.Abrev#')>
>   <CFSET tempdet=evaluate('details#lang.Abrev#')>
>   ,'#tempdesc# ','#tempdet# ',</cfloop>
>    Image='#Image#',
>    FormatImage='#formatImage#')
>   </cfquery>
>
>

------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to