Ryan...I am converting a CFML Structure to WDDX to store it in a DB, so 
action="cfml2wddx".

Brook

At 04:32 PM 9/18/2003 -0500, you wrote:
>Er...shouldn't your action parameter be "wddx2cfml" since you are trying to
>deserialize the packet?
>
>If all else fails: <cfdump var="#tempWddxData2#">
>
>
>HTH,
>
>Ryan Kime
>
>-----Original Message-----
>From: Brook Davies [mailto:[EMAIL PROTECTED]
>Sent: Thursday, September 18, 2003 3:37 PM
>To: CF-Talk
>Subject: Help! Inserting WDDX into the database
>
>
>I have a WDDX packet that, no matter what I try, generates an error when I
>try to insert it into a SQL 7.0 DB. Any ideas?
>
>My Query looks like this:
>
><cfwddx input="#tempWddxData#" output="tempWddxData2" action="cfml2wddx">
><!--- add a new member to an existing pool --->
><cfquery datasource="#request.datasource#" name="AddMember"> insert into
>LeadDistr_members (
>          usr_id,
>          form_id,
>          LeadDistrID,
>          member_name,
>          priority,
>          wddxdata
>          )
>          values
>          (
>          <cfqueryparam cfsqltype="cf_sql_integer"
>value="#getmembers.usr_id#">,
>          <cfqueryparam cfsqltype="cf_sql_integer"
>value="#getmembers.form_id#">,
>          <cfqueryparam cfsqltype="cf_sql_integer" value="#newprofileID#">,
>          <cfqueryparam cfsqltype="cf_sql_varchar"
>value="#getmembers.member_name#">,
>          <cfqueryparam cfsqltype="cf_sql_integer"
>value="#getmembers.priority#">,
>          '#tempWddxData2#'
></cfquery>
>
>
>I end up with an error like the one below. Also below is the outputted SQL
>Statement from the debugger:
>
>============================================================================
>==============
>Error Executing Database Query.
>[Macromedia][SQLServer JDBC Driver][SQLServer]Line 16: Incorrect syntax
>near 'City
>
>============================================================================
>==============
>
>SQL insert into LeadDistr_members ( usr_id, form_id, LeadDistrID,
>member_name, priority, wddxdata ) values ( (param 1) , (param 2) , (param
>3) , (param 4) , (param 5) , '<wddxPacket
>version=''1.0''><header/><data><struct><var
>name=''field1''><string>City</string></var><var
>name=''field2''><string></string></var><var
>name=''field3''><string></string></var><var
>name=''value2''><string></string></var><var
>name=''value3''><string></string></var><var
>name=''value1''><string>asdfasdf</string></var></struct></data></wddxPacket>
>'
>
>
>============================================================================
>==============
>
>I've spent an hour trying everything I can think of. Now I am stumped.
>
>Brook Davies
>
>
>At 04:08 PM 9/18/2003 -0400, you wrote:
> > >   <CFSET Temp = QuerySetCell(Session.Cart, "Amount",
> > >   "<CFOUTPUT>#Evaluate(Form.S4x6 * 3.95)#</CFOUTPUT>")>
> >
> >
> >Rick:
> >
> >What are the CFOUTPUT tags doing in your CFSET tag?  Shouldn't this
> >just be:
> >
> >         <CFSET Temp = QuerySetCell(Session.Cart, "Amount",
> > Evaluate(Form.S4x6 *
> >3.95))>
> >
> >My guess is that your SESSION.cart.amount variable is really equal to:
> >
> >         <CFOUTPUT>11.85</CFOUTPUT>
> >
> >and when that string gets spat out to the browser in the error message,
> >your browser is hiding the CFOUTPUT tags because it assumes they are
> >HTML tags that it is unfamiliar with.  Check the HTML source code.
> >
> >--
> >Mosh Teitelbaum
> >evoch, LLC
> >Tel: (301) 942-5378
> >Fax: (301) 933-3651
> >Email: [EMAIL PROTECTED]
> >WWW: http://www.evoch.com/
> >
> >
> > > -----Original Message-----
> > > From: Rick Faircloth [mailto:[EMAIL PROTECTED]
> > > Sent: Thursday, September 18, 2003 3:39 PM
> > > To: CF-Talk
> > > Subject: Can anyone explain why this code is behaving like it is?
> > >
> > >
> > > This stuff is driving me crazy!  All day spent to get almost
> > > nowhere...
> > >
> > > Anyway...(deep breath)...
> > >
> > > Quick question:  Does taking a number from a formfield and putting
> > > it into a "session.cart.amount" variable automatically turn it into
> > > a string variable?
> > >
> > > I'm sending a number from a formfield and in testing the amount from
> > > the formfield, I can multiply it, format it using DollarFormat,
> > > etc... behaves like a number should.
> > >
> > > But once the formfield variable is placed in the Session Query as
> > > session.cart.amount, it behaves like a string...I can't use
> > > DollarFormat...it returns an error that the variable
> > > session.cart.amount has to be a number...if I use
> > > DollarFormat(Val(session.cart.amount)), the value of the variable is
> > > 0...zero... it becomes a valueless string...
> > >
> > > I've haven't worked with the "session-type" queries created with
> > > Session.Cart = QueryNew etc., before and I guess I'm missing
> > > something...this should be simple stuff...but...
> > >
> > > If anyone has any suggestions about why this is going on, I'd be
> > > grateful for the help...
> > >
> > > Rick
> > >
> > >
> > > Excerpts from the code:
> > >
> > > The formfield:
> > >
> > > <SELECT Name="S4x6" Class="TextInput01">
> > >
> > >      <Option Value="0" Selected>0</Option>
> > >      <Option Value="1">1</Option>
> > >      <Option Value="2">2</Option>
> > >      <Option Value="3">3</Option>
> > >      <Option Value="4">4</Option>
> > >      <Option Value="5">5</Option>
> > >      <Option Value="6">6</Option>
> > >      <Option Value="7">7</Option>
> > >      <Option Value="8">8</Option>
> > >      <Option Value="9">9</Option>
> > >      <Option Value="10">10</Option>
> > >
> > > </SELECT>
> > >
> > >
> > >
> > > Sent to another page for processing:
> > >
> > >
> > >
> > > <CFLOCK Scope="Session" Type="Exclusive" TimeOut="5">
> > >
> > > <CFSET Session.Total = 0>
> > >
> > > <CFIF Form.S4x6 is not "0">
> > >
> > > <CFSET Temp = QueryAddRow(Session.Cart)>
> > > <CFSET Temp = QuerySetCell(Session.Cart, "PhotoFileName",
> > > "<CFOUTPUT>#Form.PhotoFileName#</CFOUTPUT>")>
> > > <CFSET Temp = QuerySetCell(Session.Cart, "Quantity",
> > > "<CFOUTPUT>#Form.S4x6#</CFOUTPUT>")>
> > > <CFSET Temp = QuerySetCell(Session.Cart, "Size", "4 x 6")> <CFSET
> > > Temp = QuerySetCell(Session.Cart, "Amount",
> > > "<CFOUTPUT>#Evaluate(Form.S4x6 * 3.95)#</CFOUTPUT>")>
> > >
> > > <CFOUTPUT>#DollarFormat(Session.Cart.Amount)#</CFOUTPUT><br>
> > >
> > >
> > > -----------------Note: CURRENTLY, ON THE LINE ABOVE, I GET THE
> > > FOLLOWING
> > > ERROR:
> > >
> > > Parameter 1 of function DollarFormat which is now "11.85" must be a
> > > number
> > >
> > > I've tried using Val to create a number out of what must be a
> > > string, but that will create a variable with a value of 0 (zero)...
> > >
> > > ------------------------------------------------------------------
> > > ----------
> > > -------------------------------------------------------
> > >
> > > </CFIF>
> > >
> > > <CFLOOP Query="Session.Cart">
> > >
> > >      <CFOUTPUT>
> > >           PhotoFileName: #PhotoFileName#
> > >           Quantity: #Quantity#
> > >           Size:  #Size#
> > >           Amount:  #DollarFormat(Amount)#
> > >      </CFOUTPUT>
> > >
> > >   <CFOUTPUT>#DollarFormat(Amount)#</CFOUTPUT>
> > >
> > >   <CFSET Session.Total =
> > > Evaluate(Session.Total+Session.Cart.Amount)>
> > >
> > > </CFLOOP>
> > > <br><br>
> > >
> > > Order Total:
> > > <CFOUTPUT>#DollarFormat(Session.Cart.Amount)#</CFOUTPUT>
> > >
> > > </CFLOCK>
> > >
> > >
> > >
> >
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm?link=i:4:137620
Archives: http://www.houseoffusion.com/lists.cfm?link=t:4
Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Get the mailserver that powers this list at 
http://www.coolfusion.com

Reply via email to