ADO or DataEnvironment COMMAND Using Store procedure can't return recordset 
Author Message
 ADO or DataEnvironment COMMAND Using Store procedure can't return recordset

My Store procedure:
CREATE PROCEDURE Mytest
AS
Create Table #Rt_Bef(Type_code varchar(10), bc decimal(5,2),ic
decimal(5,2),oc decimal(5,2),ac decimal(5,2))

Insert into #Rt_Bef Values ('TYPE',0.9,1,3,4)
Insert into #Rt_Bef Values ('EUR',1,7,9,6)

Select * from #Rt_Bef

--Drop Table #Rt_Bef

ADO command:
    Dim cmmtest As New ADODB.Command
    Dim RstTest As New ADODB.Recordset
    With cmmtest
        Set .ActiveConnection = cnnRpt
        .CommandType = adCmdStoredProc
        .CommandText = "Mytest"
        Set RstTest = .Execute
    End With

    Debug.Print RstTest.Fields(0).Value

Problem:
The Recordset RstTest doesn't exist after execute. I have tried
DataEnvironment, add a command using this Store procedure ,doesn't work
either. If I don't use "Insert Into" In the Store procedure, everything will
OK. Can anybody tell me what wrong with the program?

Thanks advanced.
Yue



Tue, 22 Oct 2002 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. ADO or DataEnvironment COMMAND Using Store procedure can't return recordset

2. ado recordsets from stored procedures, stored procedures have input parameters

3. Opening an ADO recordset against a dataset returned from a SQL Server Stored Procedure

4. SQL stored procedure returning unusual ado recordset

5. How to return Parameters and Recordset from Oracle Stored Procedure with ADO

6. Using SQL2000, returning an XML document (string) instead of a recordset, from a stored procedure

7. ADO don't get output param or return value when stored procedure contains update

8. Can't capture the rc returned from a store procedure using cursor

9. HELP!!!!, using ADO + SQL 2000 + Stored procedures does not return a value

10. Can't reset commandtext for recordset in dataenvironment using ADo

11. HELP!!!!, using ADO + SQL 2000 + Stored procedures does not return a value

12. Q: Stored Procedure + Dataenvironment Returning Strings

 

 
Powered by phpBB® Forum Software