<cfloop index="IndexCount" from="1" To="#ListLen(Session.Crtcalid, "^")#">
<cfoutput>
<cfset xname = #ListGetAt(Session.Crtxname, IndexCount, "^")#>
<cfset ProdQty = #ListGetAt(Session.CrtQuantity, IndexCount, "^")#>
<cfset ProdCost = #ListGetAt(Session.CrtPrice, IndexCount, "^")# * 
#ListGetAt(Session.CrtQuantity, IndexCount, "^")#>
</cfoutput>
I need help writing an array to dump the values of this cart (session.crtcalid)so they 
can loop one at a time and insert in to my query. Can anyone help me with this? All 
help will be appreciated. As of now it tries to insert all the values at once for 
xlocator which is the firld that i am using to hold the event id. this is the error. 
ODBC Error Code = 22001 (String data right truncation)<P> [MERANT][ODBC Oracle 8 
driver][Oracle 8]ORA-01401: inserted value too large for column <P><P> SQL = ""Insert 
Into     registrar_data.event    (     xstatus,     xdate,     xtime,      xgroup$,    
 xgroupdate,     xgrouptime,     xcreate,      xupdate,     xuser,     rhas_note$,     
xlocator,     xuniquekey,     xorigin,     xnumber     )    Values    (    'E',    
to_date('18-Sep-03', 'DD-MON-YY'),    '13:19:38',    'E',    to_date('18-Sep-03', 
'DD-MON-YY'),    '13:19:38',    to_date('18-Sep-03', 'DD-MON-YY'),    
to_date('18-Sep-03', 'DD-MON-YY'),     'WEB',    '0',    '0000002407^0000002394',    
'W00000644',    '01',    'W0000000644'    )"" "
here is what i am inseting to my db. 
<cfset rid="W" & numberformat(getrid.recurid + 1,"0000000000")>
<CFQUERY Name = "AddOrder" Datasource = #application.dsn#> 
  Insert Into registrar_data.event
  (
   xstatus, xdate, xtime, xgroup$, xgroupdate, xgrouptime,xcreate,xupdate,
   xuser, rhas_note$,xlocator,xuniquekey,xorigin, xnumber )
  Values
  (
  'E', to_date('#DateFormat(now(),"dd-mmm-yy")#', 'DD-MON-YY'),
  '#registertime#','E',
  to_date('#DateFormat(now(),"dd-mmm-yy")#', 'DD-MON-YY'),
  '#registertime#',
  to_date('#DateFormat(now(),"dd-mmm-yy")#', 'DD-MON-YY'),
  to_date('#DateFormat(now(),"dd-mmm-yy")#', 'DD-MON-YY'), 
  'WEB','0', #Session.Crtcalid#', '#CustomerIDNumber#', '01',
  '#rid#'
  )
  </cfquery>
  </cfloop>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm?link=i:4:137538
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

This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
http://www.cfhosting.com

Reply via email to