Go to main content
Oracle® Objects for OLE C++ Class Library Developer's Guide
10g Release 2 (10.2)

B14308-01
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

CanUpdate Method

Applies To

ODynaset

Description

This method returns TRUE if the ODynaset is updatable.

Usage

oboolean CanUpdate(void) const

Remarks

Depending on the SQL statement that is used to Open or Refresh the ODynaset, it may or may not be possible to make changes to the dynaset. Several factors can make a dynaset non-updatable:

Note that even if the SQL statement references only a single view, the dynaset will not be updatable if that view is created by way of a join, computed columns, or aliased columns.

Return Value

TRUE if the dynaset is updatable; FALSE if not.

Example

Here are examples of dynaset updatability.

// we assume the existence of an open ODatabase named odb

ODynaset dyn; // construct an ODynaset

// now open the ODynaset with various SQL statements

dyn.Open(odb, "select * from emp");

if (dyn.CanUpdate()) ; // is TRUE

dyn.Open(odb, "select sal*1.1 from emp");

if (dyn.CanUpdate()) ; // FALSE because of computed field

dyn.Open(odb, "select emp.ename, dept.dname from emp, dept \

where emp.deptno = dept.deptno");

if (dyn.CanUpdate()) ; // FALSE because of join