Is it a comma delimited List???  if not, then have you specified the
delimiter?  (I've been guilty of that once or twice...)

Shawn

-----Original Message-----
From: Janine Jakim [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 24, 2002 1:55 PM
To: CF-Talk
Subject: RE: stored procedure with cfloop?


Thanks- I do have the "#ListGetAt(Grade, X)#"- I'll keep looking- I'm sure
it's something small...Friday afternoon-can't concentrate.

-----Original Message-----
From: Shawn Grover [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 24, 2002 4:00 PM
To: CF-Talk
Subject: RE: stored procedure with cfloop?


If you are trying to save each list element individually, then you should
have a <CFPROCPARAM> tag with the value set to "#ListGetAt(Grade, X)#".

If you are just pasing GRADE as a parameter, then yes, you are passing the
whole list.

But your logic looks reasonable to me.

Shawn Grover

-----Original Message-----
From: Janine Jakim [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 24, 2002 1:42 PM
To: CF-Talk
Subject: RE: stored procedure with cfloop?


Ok I'll look again at those, but I was pretty confident they were correct.
I was half wondering if I was accidentally trying to save the whole list
instead of each individual peiece
What i'm doing is
<CFLOOP INDEX="X" FROM=1 TO="#ListLen(Grade)#">
<CFSTOREDPROC PROCEDURE="pro_Update" DATASOURCE="#dsn#">
<blah/blah>
</CFSTOREDPROC>
</CFLOOP>


-----Original Message-----
From: Shawn Grover [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 24, 2002 3:40 PM
To: CF-Talk
Subject: RE: stored procedure with cfloop?


you want to do a loop IN the stored procedure? or call a stored proc
multiple times within a CFLoop?

If the latter, then yes, it's possible.

If the previous, then yes, you can do loops, but the routines are a little
different, and if you are looping over a recordset, then you need a cursor.

As for your error, I see this one all the time...  it has nothing to do with
loops - it's a problem with the parameter's you've passed to the stored proc
(an empty string maybe, or a string that is 1000 characters where the field
can only handle 10 chars).  You need to dump the values you are passing to
the stored proc and make sure they're correct.

Hope this helps.

Shawn Grover

-----Original Message-----
From: Janine Jakim [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 24, 2002 1:21 PM
To: CF-Talk
Subject: stored procedure with cfloop?


Is it possible to do a stored procedrue with a cfloop?  I'm moving over
queries to sp and have an update one that uses a cfloop.
I tried setting it up and got the error
"ODBC Error Code = 22001 (String data right truncation)
[Microsoft][ODBC SQL Server Driver][SQL Server]String or binary data would
be truncated."
Thanks,
j





______________________________________________________________________
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to