HELP!!!!! Creating an RDOresultset in VB using Oracle stored procedures 
Author Message
 HELP!!!!! Creating an RDOresultset in VB using Oracle stored procedures

Does anyone know how to create an Oracle stored procedure that I can
call in VB?  I get the error message "Cursor not open or cursor
closed" from VB.

Here is my stored procedure:

create or replace procedure sp_test
cursor c1
select last_name from s_emp;
Here is my VB code:

Private Sub Command1_Click()

   Dim en as rdoEnvironment
   Dim cn as rdoConnection
   Dim sConn As String
   Dim rs As rdoResultset
   Dim sSQL As String
   Dim i As Integer

   Screen.MousePointer = vbHourglass

   sConn = "UID=dan;PWD=welcome;driver={Microsoft ODBC Driver " & _
                "for Oracle};CONNECTSTRING=ORACLE;"

   sSQL = "{call sp_test}"

   Set en = rdoEnvironments(0)
   Set cn = en.OpenConnection("", rdDriverNoPrompt, False, sConn)

   Set rs = cn.OpenResultset(sSQL, rdOpenStatic)

  for i = 1 to rs.Rowcount  
        Debug.Print (rs!last_name)
  next i


   Set rs = Nothing
   Set cn=nothing
   Set en=nothing

End Sub

Wed, 30 Aug 2000 03:00:00 GMT  
 [ 1 post ] 

 Relevant Pages 

1. HELP ==>Oracle Stored Procedure using ADO(VB)

2. HELP ==>Oracle Stored Procedure(PACKAGE) using ADO(VB)

3. Creating Oracle Stored Procedures in VB?

4. Accessing Oracle Stored procedure output parameter from VB using RDO2.0

5. Calling an Oracle Stored Procedure from Vb using Q+E

6. Help Using Oracle Stored Procedures

7. oracle's stored procedure from vb using ADO

8. Unable to get Output data using VB, Ado 2.1 and Oracle Stored procedure

9. Calling a Stored Procedure in Oracle using VB

10. HELP on VB to Oracle Stored Procedures

11. VB - Unicode and Oracle Stored Procedures........Help

12. Create a TEMP table with Stored procedures (Oracle)


Powered by phpBB® Forum Software