|
saAPI *NativeAPI() const;
Returns a set of functions of native DBMS client API.
Return value
A pointer to a base class saAPI from which
a family of DBMS implementation-specific classes are derived.
Remarks
Use NativeAPI method if you want to call
client specific API functions which are not directly supported by the
Library. NativeAPI method returns a pointer to the
set of native API functions available for an DBMS client you currently
use. To use the database API directly you have to downcast this saAPI
pointer to the appropriate type and use its implementation-specific
members.
See DBMS specific notes section to know
what type cast you have to make and what additional header file you
have to include to work with specific DBMS client API. Note that for
some DBMS using appropriate type casting depends on an API version
(that generally mean that you have to explicitly check client version
before casting, see ClientVersion
method).
To get more information about DBMS API functions see this
DBMS specific documentation.
Please be aware of the
complications associated with making direct API calls, as the internal
logic of the SQLAPI++ Library is not used. Besides, making direct API
calls reduces an application's portability.
DBMS specific notes
|
DBMS client
|
Type casting
|
Additional
include file
|
|
Oracle 8 (OCI8)
|
Cast the result to class ora8API:
saAPI *pResult = con.NativeAPI();
ora8API *p_ora8API = (ora8API *)pResult;
|
#include <oraAPI.h>
|
|
Oracle 7 (OCI7)
|
Cast the result to class ora7API:
saAPI *pResult = con.NativeAPI();
ora7API *p_ora7API = (ora7API *)pResult;
|
#include <ora7API.h>
|
|
SQL Server (OLE DB)
|
Cast the result to class ssOleDbAPI:
saAPI *pResult = con.NativeAPI();
ssOleDbAPI *p_ssOleDbAPI = (ssOleDbAPI *)pResult;
|
#include <ssOleDbAPI.h>
|
|
SQL Server
(DB-Library)
|
Cast the result to class ssAPI:
saAPI *pResult = con.NativeAPI();
ssAPI *p_ssAPI = (ssAPI *)pResult;
|
#include <ss6API.h>
|
|
Sybase
|
Cast the result to class sybAPI:
saAPI *pResult = con.NativeAPI();
sybAPI *p_sybAPI = (sybAPI *)pResult;
|
#include <sybAPI.h>
|
|
DB2
|
Cast the result to class db2API:
saAPI *pResult = con.NativeAPI();
db2API *p_db2API = (db2API *)pResult;
|
#include <db2API.h>
|
|
Informix
|
Cast the result to class infAPI:
saAPI *pResult = con.NativeAPI();
infAPI *p_infAPI = (infAPI *)pResult;
|
#include <infAPI.h>
|
|
InterBase
|
Cast the result to class ibAPI:
saAPI *pResult = con.NativeAPI();
ibAPI *p_ibAPI = (ibAPI *)pResult;
|
#include <ibAPI.h>
|
|
SQLBase 6
|
Cast the result to class sb6API:
saAPI* pResult = con.NativeAPI();
sb6API *p_sb6API = (sb6API *)pResult;
|
#include <sbAPI.h>
|
|
SQLBase 7
|
Cast the result to class sb7API:
saAPI *pResult = con.NativeAPI();
sb7API *p_sb7API = (sb7API *)pResult;
|
#include <sbAPI.h>
|
|
MySQL
|
Cast the result to class myAPI:
saAPI *pResult = con.NativeAPI();
myAPI *p_myAPI = (myAPI *)pResult;
|
#include <myAPI.h>
|
|
PostgreSQL
|
Cast the result to class pgAPI:
saAPI *pResult = con.NativeAPI();
pgAPI *p_pgAPI = (pgAPI *)pResult;
|
#include <pgAPI.h>
|
|
ODBC
|
Cast the result to class odbcAPI:
saAPI *pResult = con.NativeAPI();
odbcAPI *p_odbcAPI = (odbcAPI *)pResult;
|
#include <odbcAPI.h>
|
See also
SAConnection::ClientVersion,
SAConnection::NativeHandles,
SACommand::NativeHandles
Problems and Questions
If you haven't found the answer to your questions or have
some problems on using the Library, please, send e-mail to howto@sqlapi.com.
|