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

Open (OSqlStmt) Method

Applies To

OSqlStmt

Description

This method opens a SQL statement.

Usage

oresult Open(const ODatabase &odb, const char *sql_statement, long options = OSQLSTMT_DEFAULT);

Arguments
Description
odb
The database with which to open this dynaset.
sqlstmt
A valid select SQL statement.
options
Options to be used to create the OSqlStmt instance. Valid options are:
OSQLSTMT_DEFAULT
OSQLSTMT_NOBIND
OSQLSTMT_FAILEXEC
Remarks

The OSQLSTMT_FAILEXEC option forces an error when there is an error executing the sql statement.

Return Value

An oresult indicating whether the operation succeeded (OSUCCESS) or not (OFAILURE).

Example

oresult res;

OSession osess;

OStartup();

osess.Open();

ODatabase odb(osess, "exampledb", "scott", "tiger");

OSqlStmt osql;

osql.Open(odb, "insert into emp(empno, deptno) values (99,10)",

OSQLSTMT_FAILEXEC);


 
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