|
Hmmm...
OK, lets look at
the CF code side for a minute. I'm assuming you'd have to be using cfstoredproc
as your stored proc has output params?
"however the
select statement that should return the new record to the client again does not
retrieve it"
Do you have the
cfstoredproc's cfprocparam set to something like this:
<cfprocparam
type="out"
variable="myVar"
(careful not to use value="myVar", although I
would expect the compiler to pick that one up.)
cfsqltype="CF_SQL_INTEGER"
dbvarname="@newThreadID"
null="yes"
>
The new thread_id
is <cfoutput>#VARIABLES.myVar#</cfoutput>!
I wouldn't mind
changing this part of your proc just to be sure of whats returned (if
anything):
IF NOT (@@ERROR = 0)
BEGIN SET @bError = 1 END SET @newThreadID = SCOPE_IDENTITY() Changed to:
IF
@@ERROR <> 0
BEGIN SET @newThreadID = -1 RETURN
@@ERROR
END
ELSE
BEGIN
SET @newThreadID =
SCOPE_IDENTITY()
END
The reason I want to
change this is if an error did occur above the next part of your proc would
still execute and not return an identity value. To use the above code you need
to enable the return code in the cfstoredproc and catch it using
using the #cfstoredproc.statuscode#.
Cheers,
John
PS. This is
nothing to do with the problem your having, but be carefull with your rows sizes
(Bytes per row). SQL Server can hold 8060 bytes the rest that makes the 8192
bytes is SQL's overhead (header information). If a user enters a thread that has
a combined column size greater than 8060 bytes, your insert will fall
over.
--- You are currently subscribed to cfaussie as: [email protected] To unsubscribe send a blank email to [EMAIL PROTECTED] MX Downunder AsiaPac DevCon - http://mxdu.com/ |
Title: Message
- [cfaussie] RE: Slow insert with SP ??? John Reed
- [cfaussie] RE: Slow insert with SP ??? Taco Fleur
- [cfaussie] RE: Slow insert with SP ??? John Reed
- [cfaussie] RE: Slow insert with SP ??? Taco Fleur
- [cfaussie] RE: Slow insert with SP ??? Taco Fleur
- [cfaussie] RE: Slow insert with SP ??? John Reed
- [cfaussie] RE: Slow insert with SP ??? Taco Fleur
