Oracle Objects for OLE
Release 9.0.1

Part Number A90173-01

Home

Book List

Contents

Master Index

Feedback

Refresh Method

See Also
Examples
Applies To

OraDynaset

OraSQLStmt

Description

Forces an immediate update of the dynaset given the current Connect, DatabaseName, and SQL properties.

Forces an immediate update of the dynaset by re-executing the SQL statement in the SQL statement object.

Usage

oradynaset.Refresh

oradynaset.DbRefresh

orasqlstmt.Refresh

orasqlstmt.DbRefresh

Remarks

This method cancels all edit operations (Edit and AddNew), executes the current contents of the SQL statement buffer, and moves to the first row of the resulting dynaset. Any dynaset objects created before issuing the Refresh method, including bookmarks, record counts, and field collections, are considered invalid. The OraConnection and OraSession objects associated with the previous dynaset remain unchanged.

Performing a refresh operation with this method can be more efficient than refreshing with a data control. This method also lets you execute a modified SQL statement without creating a new dynaset or sqlstmt object.

Using oradynaset.Refresh or orasqlstmt.Refresh is the preferred refresh method when changing parameter values, because required database operations are minimized (SQL parsing, binding, etc.). This can improve performance when only parameter values have changed.

If you call the Refresh method after assigning an invalid SQL statement to the SQL property of a dynaset or SQL statement object, these objects remain valid. However, a dynaset in this state will not permit any row or field operations. Bound controls will also exhibit unusual behaviors similar to those that occur when the standard Visual Basic data control RecordSource is set to an invalid SQL statement at run time and then Refreshed.

You can regain the normal dynaset and SQL statement operations by refreshing the object with a valid SQL statement. Refresh treats NULL or empty SQL statements as invalid.


 
Oracle
Copyright © 1996-2001, Oracle Corporation.

All Rights Reserved.

Home

Book List

Contents