Oracle Objects for OLE C++ Class Library
Release 9.2

Part Number A95896-01
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents

Master Index

Feedback

OSqlStmt

The OSqlStmt class represents a single SQL statement. OSqlStmt is a subclass of OOracleObject.

An OSqlStmt is opened by executing a query against an Oracle database in the form of a SQL statement. Any legal SQL statement is acceptable. The SQL statement should not be a query, but can use select clauses in some other kind of statement. If the SQL statement modifies the data accessed by an open dynaset, the dynaset is not guaranteed to see the change until it is Refreshed.

Note: Some kinds of SQL statements result in an implicit commit. Consult your Oracle documentation.

Open and Refresh methods automatically bind all relevant, enabled input parameters to the specified SQL statement. These methods use the parameter names as placeholders in the SQL statement. Refresh can improve the performance of SQL statement execution without reparsing the SQL statement.

When you open an OSqlStmt, you can set the following options:

Option
Description
OSQLSTMT_NOBIND
// do not use bindable parameters
OSQLSTMT_DEFAULT
// the default settings
OSQLSTMT_FAILEXEC
// forces an error when there is an error executing the sql statement
OSQLSTMT_NONBLK
//executes the sql statement in non-blocking mode

By default, the Open method attempts to use available bindable parameters (see OParameter for more information on parameters). Therefore, when issuing a SQL statement that does not refer to any parameters, you can make the SQL statement more efficient by specifying nobind.

Construction and Destruction:

OSqlStmt

~OSqlStmt

operator=

Attributes:

CanTransact

CanRefresh

GetOptions

GetRecordCount

GetSQL

Operations:

GetDatabase

GetSession

GetConnection

SetSQL

Open

Refresh

NonBlockingState

Cancel

Error Handling:

ErrorNumber

ErrorReset

GetErrorText

LookupErrorText


 
Oracle
Copyright © 1998, 2002 Oracle Corporation.

All Rights Reserved.
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents

Master Index

Feedback