Have you tried placing ## around your entire evaluate statements? At least
the ones in the values string inside your query.
Like this:
'#Evaluate("attributes.OptValue#i#")#'
I know when I had some trouble from the evaluate function a short while ago,
I got the error to go away by doing this. Otherwise Cf will see the extra
brackets and hiccup, not knowing what to do with them.
Good Luck!
Ryan
[EMAIL PROTECTED]
----- Original Message -----
From: "Bradley Roberts" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, July 07, 2000 12:27 PM
Subject: OT: Query Error - Invalid Bracketing
> Sorry for the OT post, but the forums absolutley STINK, and I think you
guys
> are more competent than the rest of the CF world anyway. :-}
>
> I'm getting the following error when I try to use cfloop to insert
multiple
> records.
>
>
****************************************************************************
> ODBC Error Code = 37000 (Syntax error or access violation)
>
> [Microsoft][ODBC Microsoft Access Driver] Invalid bracketing of name
> '[attributes.OptID1]'.
>
> The error occurred while processing an element with a general identifier
of
> (CFQUERY), occupying document position (6:1) to (9:37).
>
****************************************************************************
>
> I've tried to change my syntax every way I can imagine. Here's my code:
>
> <cfloop index="i" from="1" to="#attributes.OptionQty#">
>
> <cfquery
> datasource="#attributes.dsn#"
> username="#attributes.dsnUsername#"
> password="#attributes.dsnPassword#">
> INSERT INTO Options
> (PrID,
> OptID,
> OptValue,
> OptPrice,
> OptWeight,
> OptOrderBy)
> VALUES
> (#attributes.ProductID#,
> Evaluate("attributes.OptID#i#"),
> 'Evaluate("attributes.OptValue#i#")', <!------------------------------
> Getting stuck here ------>
> <cfif Not CompareNoCase(Evaluate("attributes.OptPrice#i#"), "")>
> 0,
> <cfelse>
> Replace(Evaluate("attributes.OptPrice#i#"), "$", "", "ALL"),
> </cfif>
> <cfif Not CompareNoCase(Evaluate("attributes.OptWeight#i#"), "")>
> NULL,
> <cfelse>
> Evaluate("attributes.OptWeight#i#"),
> </cfif>
> <cfif Not CompareNoCase(Evaluate("attributes.OptOrderBy#i#"), "")>
> NULL)
> <cfelse>
> Evaluate("attributes.OptOrderBy#i#"))
> </cfif>
> </cfquery>
>
> </cfloop>
>
> Thanks,
>
> Brad Roberts
>
>
>
> --------------------------------------------------------------------------
----
> To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/fusebox or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
>
------------------------------------------------------------------------------
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/fusebox or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.