|
Oracle Objects for OLE Release 8.1.7 Part Number A85257-01 |
|
The Oracle Data Control will be added to your Visual Basic tool palette and will look like this:
3. To add the Oracle Data Control to a project, simply drag and drop the control
onto a form. Resize and position the control.
4. Change the name of the control to ORADataControl. Set up the Connect, DatabaseName, and RecordSource properties as follows to
access the Oracle database.
5. When the Oracle Data Control is set up, you can drag and drop a Visual Basic
control onto the same form and access the data in the control. Simply set the
Data properties to access the data field and source that you want. This figure
shows a TextBox control which sets up display of the employee numbers.
6. When the project is run, the data identified by the RecordSource property is
displayed using the Oracle Data Control.
You can also use the Microsoft FlexGrid Control to display all the data in the
table. You need to add the grid control with the Components option of the
Project menu.
Setting Oracle Data Control Properties Programmatically
The following code fragment demonstrates how to programmatically set the
properties of the Oracle Data Control required to create a dynaset. These are the same properties that you can set
with the Properties window of Visual Basic.
![]() Copyright copy; 1996-2000, Oracle Corporation. All Rights Reserved. |
|