check the length of your variables rid, customeridnumber and session.crtcalid against the character lenghth of those columns. What the error is telling you is that the value you're attempting to insert into a char or varchar field is longer than the column allows.
hth ike ------ Original Message ------ From: laritru <[EMAIL PROTECTED]> To: CF-Talk <[EMAIL PROTECTED]> Sent: Sep 04, 2003 09:58 AM Subject: Re: looping dilema on multiple form inserts >I am trying to insert multiple records for a form. I am using the code below. My >problem is the following. When I am inserting multiple instances of events I get the >following error >"Error","5384","09/03/03","17:10:37",,"172.16.177.115, Mozilla/4.0 (compatible; MSIE >6.0; Windows NT 5.0; .NET CLR 1.0.3705; .NET CLR 1.1.4322), ODBC Error Code = 22001 >(String data right truncation)<P><P> [MERANT][ODBC Oracle 8 driver][Oracle >8]ORA-01401: inserted value too large for column <P><P><p>The error occurred while >processing an element with a general identifier of (CFQUERY), occupying document >position (73:1) to (73:75).</p><P><P>Date/Time: 09/03/03 17:10:36<BR>Browser: >Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.0.3705; .NET CLR >1.1.4322)<BR>Remote Address: 172.16.177.115<BR>HTTP Referrer: >http://www.testone.com/cart/testcart.cfm<P>" > >The problem for me is the following. when i start it the form i set the >session.crt.calid with the values you see below. The values that i am trying to loop >on multiple events are values that need to go in the db since the table requires >fields. Any suggestions? ><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> ><cfset rid="W" & numberformat(getrid.recurid + 1,"0000000000")> ><CFQUERY Name = "AdditemseventsToDB" Datasource = #application.dsn#> > Insert Into test_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> > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| 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

