Oracle Objects for OLE Release 9.2 Part Number A95895-01 |
|
See Also |
Quick Tour |
Employee Form |
2. Connect to the Oracle database.
See Connecting to the Oracle Database
3. Create a global OraDynaset object to manipulate data.
4. Refresh the Employee form with dynaset data.
In our example employee application, the Form_Load() procedure creates the OIP server, connects to the database, creates a global dynaset, and calls the function EmpRefresh to display the field values on the Employee form. The code for Form_Load() looks like:
Private Sub Form_Load()
'OraSession and OraDatabase are global
Set OraSession = CreateObject("OracleInProcServer.XOraSession")
Set OraDatabase = OraSession.OpenDatabase("Exampledb", "scott/tiger", 0&)
Set EmpDynaset = OraDatabase.CreateDynaset("select * from emp", 0&)
Call EmpRefresh
End Sub
The following variables are defined globally in EMP_QT.BAS:
Global OraSession As Object
Global OraDatabase As Object
Global EmpDynaset As Object
|
Copyright © 1994, 2002 Oracle Corporation. All Rights Reserved. |
|