PROCEDURE GetCursor(p_cursor1 in out empCur, indeptno IN NUMBER,Ĭreate or replace the ASP_demo package body as follows: creates PL/SQL package to be used in ASP demos Start SQL*Plus and log in to the Oracle database as scott/ tiger. The sample code for this example is available in the ORACLE_BASE\ORACLE_HOME \oo4o\iis\samples\asp\connpool directory.
' You can now display or manipulate the data in the dynaset. Set OraDynaset = OraDatabase.CreateDynaset('select * from emp', 0&) Set OraDatabase = OraSession.OpenDatabase('ExampleDb', 'scott/tiger', 0&) ' Create the OraDatabase Object by opening a connection to Oracle. Set OraSession = CreateObject('OracleInProcServer.XOraSession') ' name by which the OraSession object is known to the OLE system. Then, add the following code to the Declarations section of a form:Īdd the following code to the load procedure associated with the form to display the Oracle data: Start Visual Basic and create a new project. From the Project menu, select References and check InProcServer 5.0 Type Library.ĭescription of the illustration o4o00003.gif This example contains code fragments that demonstrate how to create all objects required by a dynaset and then create the dynaset itself. Using Oracle Objects for OLE Automation with Visual Basic