Oracle® Objects for OLE Developer's Guide 10g Release 2 (10.2) Part Number B14309-01 |
|
|
View PDF |
This chapter describes Oracle Data Control methods. For an introduction to Data Control, see "Oracle Data Control".
See Also: For more information, see the Microsoft Visual Basic help and documentation. |
This chapter contains these topics:
Applies To
Description
This method recreates the OraDatabase
and OraDynaset
objects referenced within the data control and reestablishes a dynaset using the SQL statement from the RecordSource
property and the connection information from the Connect
and DatabaseName
properties.
Usage
oradata1.Refresh
Remarks
If an existing dynaset has been assigned to an object variable in Visual Basic, then Refresh
creates a new dynaset for the data control, but the old dynaset continues to be available for use until all references to it are removed.
Applies To
Recordset Property of the Oracle Data Control.
Description
Gets the current record from a data control's recordset and displays the appropriate data in controls bound to that data control.
Usage
oradata1.Recordset.UpdateControls
Example
NOTE: This code snippet is intended to be placed in a complete application. The code snippet cancels changes made to bound controls and restores the data to the original values. To use this code snippet, copy it into the definition section of a form that has a data control named oradata1 (which has been successfully refreshed) and has the KeyPreview
property set to True
.
Sub Form_KeyDown (KeyCode As Integer, Shift As Integer) Const KEY_ESCAPE = &H1B If KeyCode = KEY_ESCAPE Then oradata1.recordset.UpdateControls End If End Sub
Remarks
Use this method to allow the user to cancel changes made to bound controls and restore the contents of those controls to their original values.
This method has the effect of making the current record current again, except that no events occur.
Note: For backward compatibility with earlier .VBX control, this method is also available as the method of data control's Recordset. |
Applies To
Recordset Property of the Oracle Data Control.
Description
Saves the current values of bound controls.
oradata1.UpdateRecord
Remarks
This method enables you to save the current value of bound controls during a Validate event without generating another Validate
event.
This method has the effect of executing the Edit
method, changing a field, and executing the Update
method, except that no events occur.
Note: For backward compatibility with earlier .VBX control, this method is also available as the method of data control'sRecordset . |