adoutputparam and commit trans
From: dk (anonymous_at_discussions.microsoft.com)
Date: 04/22/04
- Next message: Val Mazur: "Re: adoutputparam and commit trans"
- Previous message: elanam: "Re: Connect to Oracle w/o using Oracle Client stuff"
- Next in thread: Val Mazur: "Re: adoutputparam and commit trans"
- Reply: Val Mazur: "Re: adoutputparam and commit trans"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 21 Apr 2004 17:41:02 -0700
are there any examples of the correct way to use commit tran in
a stored procedure and then
set an output parameter with the result.
in this example rs does is not a valid object - but the record is commited
in the sql code
ado code
Set pm28 = .CreateParameter _
("outparam", adInteger, adParamOutput)
.Parameters.Append pm28
Set rs = .Execute
sql code:
IF @@ERROR <> 0
BEGIN
ROLLBACK Tran TRN_INSERT
select @outparam= @@ERROR
END
ELSE
BEGIN
COMMIT Tran TRN_INSERT
select @outparam=0
--Return 0 --Error -- will be 0 if no errors occurred
END
tia,
dk
- Next message: Val Mazur: "Re: adoutputparam and commit trans"
- Previous message: elanam: "Re: Connect to Oracle w/o using Oracle Client stuff"
- Next in thread: Val Mazur: "Re: adoutputparam and commit trans"
- Reply: Val Mazur: "Re: adoutputparam and commit trans"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|