> -----Original Message-----
> From: Philip Arnold - ASP [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, March 15, 2001 12:57 PM
> To: CF-Talk
> Subject: RE: Insert Into Query Bombing Out - What Am I Not Seeing?
>
<snip>
>
> 1, read Ben Forta's "To # or not to #"
I have. The # marks need to be around Form.GroupList else the value of
ListID comes out as "Form.GroupList" in the insert query.
> 2, why are you naming the queries? There's no return, so no reason to name
Actually, what I sent before was the last iteration of my attempts (heck, I
was trying everything I could think of :). Here's a simplified form:
<cfloop list="#Form.GroupList#" index="i">
<cfquery datasource="operoutcry">
insert into Messages (ListID, From, Subject, MsgBody)
values(#i#, '#form.from#', '#form.subject#', '#form.msgbody#')
</cfquery>
</cfloop>
It still bombs out.
> 3, is ListID an AutoNumber? If so, you can't insert into it
No, see my previous reply.
> 4, if "i" is a value, why are you using Val(i) - it'll slow the server up
> some
Not worried about that right now. I have tried it without Val around the
"i". No difference.
> 5, ensure that your fields don't have apostrophies in them by using
> Replace(form.field,"'","''","all") - SQL will spit otherwise
They don't have apostrophies.
Still scratching my head. Thanks.
Chris
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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