Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Stored Procedures

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2001-09-18 : 22:07:42
Anand Sahu writes "Create Procedure A
@a varchar(50),
@b integer
As
Begin
Insert into Table (FName,Age) Values (@a, @b)
Exec Display @a, @b
End

Create Procedure Display
@a varchar(50),
@b integer
As
Begin
Select @a 'Name', @b 'Age'
End

Using Vb i am calling the Procedure A as follows
With all other parameters set

with cmd
.commandtype = adcmdstroredProcedure
.commandtext = 'A'
.activeconnection = constr
end with

set p = cmd.createparameter('p',...,'abc')
cmd.appendparameter p

set q= cmd.createparameter('q',...,25)
cmd.appendparameter q

Set rs = Cmd.execute

If not rs.eof then --the error occurs at this stage.
intfieldsctr= rs.fields.count
strname = rs(0)
intage = rs(1)
End if

And would like to capture the output record of the procedure.

It give's a error 3704 'Object operation requested not allowed as the object is closed.

Can be capture the output of the Procedure Display which has been excuted inside Procedure A using frontend programing in Visual Basic 6.0"
   

- Advertisement -