Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

SQLDBC_C.h File Reference


Detailed Description

General header file for the SAP Database Connectivity.

Author:
DL SAP DB INTERFACES
SQL Database Connectivity (SQLDBC) is a runtime library that enables applications to execute SQL statements in the database, and to access and modify data.

Definition in file SQLDBC_C.h.

Go to the source code of this file.

Defines

Typedefs

Enumerations

Functions


Define Documentation

#define SQLDBC_CHeaderVersion   "SQLDBC_C.H 7.7.4 BUILD 008-000-000-000"
 

The version string for the SQLDBC.H file.

Definition at line 161 of file SQLDBC_C.h.

#define SQLDBC_DLLEXPORT
 

Definition at line 183 of file SQLDBC_C.h.

#define SQLDBC_FEATURE_CONNECTION_FEATURES
 

If this macro is set the getConnectionFeatures method of SQLDBC_Connection is available.

Set SQLDBC_CONNECTION_FEATURES_OFF to disable this functionality.

Note:
This feature is available since version 7.6.04.04 of SQLDBC

Definition at line 100 of file SQLDBC_C.h.

#define SQLDBC_FEATURE_LOB_KEEPALIVE
 

If this macro is set it is possible to hold lob descriptors open cursor borders.

Definition at line 138 of file SQLDBC_C.h.

#define SQLDBC_FEATURE_METADATA_COLUMNLABEL
 

If this macro is set it is possible to retrieve the name of a table and a schema of a column in the result set metadata.

Definition at line 129 of file SQLDBC_C.h.

#define SQLDBC_FEATURE_METADATA_SCHEMATABLE
 

If this macro is set it is possible to retrieve the name of a table and a schema of a column in the result set metadata.

Definition at line 119 of file SQLDBC_C.h.

#define SQLDBC_FEATURE_PROFILE
 

If this macro is set the Class SQLDBC_Profile is available.

Set SQLDBC_FEATURE_PROFILE_OFF to disable the profile functionality.

Note:
This feature is available since version 7.6.0.14 of SQLDBC

Definition at line 50 of file SQLDBC_C.h.

#define SQLDBC_FEATURE_RESULTSET_ROWWISE
 

If this macro is set the Class SQLDBC_Profile is available.

Set SQLDBC_FEATURE_RESULTSET_ROWWISE to disable the profile functionality.

Note:
This feature is available since version 7.6.0.14 of SQLDBC

Definition at line 88 of file SQLDBC_C.h.

#define SQLDBC_FEATURE_STATEMENT_GETCONNECTION
 

Definition at line 109 of file SQLDBC_C.h.

#define SQLDBC_FEATURE_TRACEOPTION
 

If this macro is set the functions setTraceOption and getTraceOption from SQLDBCs debug trace facility are available.

Set SQLDBC_FEATURE_TRACEOPTION_OFF to disable the trace functionality.

Note:
This feature is available since version 7.6.0.07 of SQLDBC

Definition at line 39 of file SQLDBC_C.h.


Typedef Documentation

typedef enum ColumnNullBehavior ColumnNullBehavior
 

typedef enum ParameterMode ParameterMode
 

typedef enum ParameterNullBehavior ParameterNullBehavior
 

typedef struct SQLDBC_Connection SQLDBC_Connection
 

Definition at line 188 of file SQLDBC_C.h.

typedef struct SQLDBC_ConnectProperties SQLDBC_ConnectProperties
 

Specification of connection options.

Together with the command for opening a database session you can set several options. The following options are possible

OptionData TypeDescription
Internal Options
COMPNAME VARCHAR(64) The component name used to initialise the runtime environment. If it is a runtime library, the name must start with an "R". Otherwise the system considers it an application.
APPLICATION CHAR(3) The application to be connected to the database. Possible values are: CAL | CPC | CON | DOM | LOA | ODB | QUE | SQL | TPL| UTI| XCI.
APPVERSION NUMBER(5) Version of the application. This is computed: major * 10000 + minor * 100 + correction_level. E.g. version 7.6.00 has the version identifier "70600".
Database Behaviour
SQLMODE VARCHAR The SQL Mode. Possible values are: INTERNAL | ORACLE | ANSI | DB2 | SAPR3. The SAPR3 mode implies the following properties:
  • CACHE_ALL_STATEMENTS
  • SELECTFETCHOPTIMIZE
  • IGNORE_COLUMNNAMES
  • NUMBERS_WITHOUT_EXPONENT
  • MINGETVALSIZE
  • OPTIMIZEDSTREAMS (if not disabled explicitely)
UNICODE BOOLEAN TRUE | 1, the connection is an unicode (UCS2) client or FALSE | 0 it is an ASCII client.
CONNECTTYPE STRING The type of connection wanted. If not specified, the instance default is used. See also the description of the database parameter INSTANCE_TYPE The following values are accepted:
  • OLTP - The connection is an OLTP connection.
  • LVC - The connection is used for liveCache procedure calls.
TIMEOUT NUMBER The maximum allowed time of inactivity after which the connection to the database is closed by the system.
ISOLATIONLEVEL NUMBER The ISOLATION LEVEL specifies whether and how shared locks and exclusive locks are implicitly requested or released. For possible values see: setTransactionIsolation()
KEY STRING The XUSER key to use for the connect to the database.
SPACE_OPTION BOOLEAN Whether character values contain at least 1 blank, or are NULL.
Performance and Optimization Options
PACKETCOUNT NUMBER | STRING The number of different request packets used for the connection. Enter a positive number or UNLIMITED for an unlimited number of request packets
STATEMENTCACHESIZE NUMBER | STRING The number of prepared statements to be cached for the connection for re-use. Possible values are: <n>: desired number of statements 0: no statements are cached UNLIMITED: unlimited number of statements is cached. The default value for STATEMENTCACHESIZE is 1000.
CACHE_ALL_STATEMENTS BOOLEAN When used, the information for all kinds of prepared statements are cached. Otherwise, only statements that had no parameters bound when they were prepared are cached, as bound parameters may change the semantics of the statement.
SELECTFETCHOPTIMIZE INTEGER When the option has the value 1, the first rows of the result set are transferred to the client already on the execute to save one fetch command.
VARIABLEINPUT BOOLEAN If set, the new protocol to transmit statement parameters which has no space-padded data values is used, if the database kernel supports it.
OPTIMIZEDSTREAMS BOOLEAN If set, the stream handling for stored procedures that sends data for more than stream is enabled.
Compatibility Options
CURSORPREFIX STRING The prefix to use for result tables that are automatically named.
TRANSLATE_BINARY_AS_ENCODED BOOLEAN Enables the conversion from raw bytes to encoded character types (ASCII or UNICODE). If not set, the conversion between binary values and character types is not permitted. The conversion performed is only a copy of the binary values from the application.
CHOPBLANKS BOOLEAN When used, trailing blanks are removed also from CHAR columns.
DROPPARSEIDDIRECT BOOLEAN When used, parse ids of unused commands are dropped immediately.
CODEPAGENAME STRING The name of the codepage that has to be loaded from the built-in codepages or the database kernel codepage table. The following codepages are supported:
  • ISO-8859-1 (Latin 1)
  • ISO-8859-2 (Latin 2)
  • ISO-8859-3 (Latin 3)
  • ISO-8859-4 (Baltic)
  • ISO-8859-5 (Cyrillic)
  • ISO-8859-6 (Arabic)
  • ISO-8859-7 (Greek)
  • ISO-8859-8 (Hebrew)
  • ISO-8859-9 (Turkish)
  • ISO-8859-10 (Nordic)
  • ISO-8859-11 (Thai)
  • ISO-8859-13 (Baltic Rim)
  • ISO-8859-14 (Celtic)
  • ISO-8859-15 (Latin 9)
  • ISO-8859-16 (South-Eastern European)
  • WINDOWS-874 (Thai)
  • WINDOWS-932 (Japanese Shift-JIS)
  • WINDOWS-936 (Simplified Chinese GBK)
  • WINDOWS-949 (Korean)
  • WINDOWS-950 (Traditional Chinese Big5)
  • WINDOWS-1250 (Central Europe)
  • WINDOWS-1251 (Cyrillic)
  • WINDOWS-1252 (Latin 1)
  • WINDOWS-1253 (Greek)
  • WINDOWS-1254 (Turkish)
  • WINDOWS-1255 (Hebrew)
  • WINDOWS-1256 (Arabic)
  • WINDOWS-1257 (Baltic)
DEFAULTMAPCHAR CHAR The character representing non-convertible UCS2 characters in ASCII strings. This property only works if property CODEPAGENAME is set. If this property is not set, a non-convertible UCS2 character causes an conversion error when converting to ASCII. Setting DEFAULTMAPCHAR to '' disables this feature (this setting is the default).
SERVERPROGRAM STRING The name of the server program to communicate with. Using the SQLDBC client, you may also communicate with another server program than the database, such as the Loader, or the Database Manager. To communicate with the Loader, you should set this property to "LOADER", to use the database manager, set the property to "DBM", otherwise use the name of the server executable program.

Note:
Possible values for BOOLEAN options are 'true', 'false', 'yes', 'no', '0', '1'.

The options and the values are case insensitive.

Definition at line 3952 of file SQLDBC_C.h.

typedef struct SQLDBC_Environment SQLDBC_Environment
 

The SQLDBC_Environment object is the basis for initializing the SQLDBC runtime library and making general settings in the SQLDBC interface.

Definition at line 4607 of file SQLDBC_C.h.

typedef struct SQLDBC_ErrorHndl SQLDBC_ErrorHndl
 

Store for error messages and error codes.

Definition at line 195 of file SQLDBC_C.h.

typedef struct SQLDBC_IRuntime SQLDBC_IRuntime
 

Definition at line 173 of file SQLDBC_C.h.

typedef struct SQLDBC_LOB SQLDBC_LOB
 

Interface to a large object (LOB).

Definition at line 257 of file SQLDBC_C.h.

typedef struct SQLDBC_ParameterMetaData SQLDBC_ParameterMetaData
 

Can retrieve information to find out the parameter types and their properties in a PreparedStatement object.

Definition at line 437 of file SQLDBC_C.h.

typedef struct SQLDBC_PreparedStatement SQLDBC_PreparedStatement
 

A class for preparing and executing SQL statements.

A prepared SQL statement can be parsed and contain input and output parameters. Parameters are marked with a '?' or ':<name>' tag. All DML commands can be parsed. DDL commands can be parsed, too. However, it is not recommended to do so. Prepared SQL statements increase the performance since they are parsed only once and executed several times. Applications only need to change the content of the bound parameters and execute the command again.

All prepared SQL statements are stored in an internally managed ParseInfo Cache . The ParseInfo Cache shares this information with different prepared SQL statements within the same connection.

  • Use SQLDBC_Connection::createPreparedStatement from the connection object to get a new SQLDBC_PreparedStatement object.
  • Use the prepare() member function to prepare the SQL statement.
  • Use the execute() member function to execute the previously prepared SQL statement.

The SQL statement may contain ASCII or UCS2 characters and must not zero-terminated. The execute() member function converts it to the adequate code set considering the code of the database. Therefore it is possible to write portable code for UNICODE and non-UNICODE databases.

Note:
To increase the performance, applications must use UCS2 statements for UNICODE databases only.
Example:
Preparation and execution of an SQL statement.
   SQLDBC_PreparedStatement *stmt = conn->createPreparedStatement();
   SQLDBC_Retcode rc = stmt->prepare("SELECT * FROM DUAL");
   if (rc != SQLDBC_OK) {
Handle error ...
   }
   rc = stmt->execute();
   if (rc != SQLDBC_OK) {
Handle error ...
   }
   

Parameters can be bound to the statement column-wise or row-wise. The default binding type is column-wise. To use row-wise binding, applications must use the method setBindingType() with the size in bytes of the date structure to be bound.

Example:
Binding parameters column-wise and insert some data into a table using mass insert.
    int keys[] = { 1, 2, <...> };

    char *names[] = { "Congress",
                      "Long Island",
                      <...>
    };

    char *zips[] = { "20005",
                     "11788",
                     <...>
    };

    char *addresses[] = { "155 Beechwood Str.",
                          "1499 Grove Street",
                          <...>
    };

    SQLDBC_PreparedStatement *prepstmt = connection()->createPreparedStatement();

    SQLDBC_Length key_ind[15];
    SQLDBC_Length name_ind[15];
    SQLDBC_Length zip_ind[15];
    SQLDBC_Length address_ind[15];

    memset (key_ind, 0, sizeof(key_ind));
    memset (name_ind, 0, sizeof(name_ind));
    memset (name_ind, 0, sizeof(name_ind));
    memset (zip_ind, 0, sizeof(zip_ind));
    memset (address_ind, 0, sizeof(address_ind));

    prepstmt->prepare("insert into hotel.hotel (hno, name, zip, address) values (?, ?, ?, ?)");
    prepstmt->setBatchSize(15);
    prepstmt->bindParameter (1, SQLDBC_HOSTTYPE_INT4, &keys[0], &key_ind[0], sizeof(SQLDBC_Int4));
    prepstmt->bindParameterAddr(2, SQLDBC_HOSTTYPE_ASCII, &names[0], &name_ind[0], 13);
    prepstmt->bindParameterAddr(3, SQLDBC_HOSTTYPE_ASCII, &zips[0], &zip_ind[0], 5);
    prepstmt->bindParameterAddr(4, SQLDBC_HOSTTYPE_ASCII, &addresses[0], &address_ind[0], 19);

    int i;
    for (i = 0; i < 15; i++) {
      key_ind[i]      =  (SQLDBC_Length) sizeof(SQLDBC_Int4);
      name_ind[i]     =  (SQLDBC_Length) strlen((const char *) names[i]);
      zip_ind[i]      =  (SQLDBC_Length) strlen((const char *) zips[i]);
      address_ind[i]  =  (SQLDBC_Length) strlen((const char *) addresses[i]);
    }
    prepstmt->execute ();
   

Example:
Binding parameters row-wise and insert some data into a table using mass insert.
    typedef struct {
      SQLDBC_Int4     key;
      char           *name;
      char           *zip;
      char           *address;
      SQLDBC_Length   key_ind;
      SQLDBC_Length   name_ind;
      SQLDBC_Length   zip_ind;
      SQLDBC_Length   address_ind;
    } row;

    row rows[] = { { 1, "Congress", "20005", "155 Beechwood Str.", 0, 0, 0 },
                   { 2, "Long Island", "11788", "1499 Grove Street", 0, 0, 0 },
                   <...>
    };

    SQLDBC_PreparedStatement *prepstmt = connection()->createPreparedStatement();

    prepstmt->prepare("insert into hotel.hotel (hno, name, zip, address) values (?, ?, ?, ?)");
    prepstmt->setBindingType(sizeof(row));
    prepstmt->setBatchSize(15);
    prepstmt->bindParameter (1, SQLDBC_HOSTTYPE_INT4, &rows[0].key, &rows[0].key_ind, sizeof(SQLDBC_Int4));
    prepstmt->bindParameterAddr(2, SQLDBC_HOSTTYPE_ASCII, &rows[0].name   , &rows[0].name_ind   , rows[0].name_ind    );
    prepstmt->bindParameterAddr(3, SQLDBC_HOSTTYPE_ASCII, &rows[0].zip    , &rows[0].zip_ind    , rows[0].zip_ind     );
    prepstmt->bindParameterAddr(4, SQLDBC_HOSTTYPE_ASCII, &rows[0].address, &rows[0].address_ind, rows[0].address_ind );

    int i;
    for (i = 0; i < 15; i++) {
      rows[i].key_ind      =  (SQLDBC_Length) sizeof(SQLDBC_Int4);
      rows[i].name_ind     =  (SQLDBC_Length) strlen((const char *) rows[i].name);
      rows[i].zip_ind      =  (SQLDBC_Length) strlen((const char *) rows[i].zip);
      rows[i].address_ind  =  (SQLDBC_Length) strlen((const char *) rows[i].address);
    }
    prepstmt->execute ();
   

Hints:
  • The application must call createPreparedStatement() to retrieve a prepared SQL statement
  • For parsing the SQL statement, call the prepare() member function,
  • For a single-row execution, use the execute() member function,
  • For mass execution, bind arrays of parameter values, use setBatchSize() to set the row array size to the number of array elements bound, and use the execute() method.
  • Use the isQuery() method to check whether the parsed statement creates a result set upon execution.
  • Use SQLDBC_Statement for a direct execution, since the prepared statement inherits all direct-execution functions from SQLDBC_Statement.
  • The current result set is deleted when
    • A new statement is parsed
    • The statement is re-executed
    • The statement is deleted
Todo:
binding parameter by name

Definition at line 2896 of file SQLDBC_C.h.

typedef struct SQLDBC_Profile SQLDBC_Profile
 

The SQLDBC_Profile object collects profile values of SQLDBC.

SQLDBC_Profile can be used to collect and retrieve profiling data from your application to find perfomance bottlenecks and to tune up your application. A lot of profile counters will give you detailed information about:

  • how many statements were executed,
  • what kind of statements were executed,
  • frequency of calling important SQLDBC API methods, i.e. commit, cancel, prepare etc.,
  • how many objects handles (SQLDBC_Connection, SQLDBC_Statement etc.) were allocated
  • size of data send/received to/from the database kernel. For detailed information about the different profile counters see SQLDBC_ProfileCountValues.

Definition at line 4569 of file SQLDBC_C.h.

typedef struct SQLDBC_ResultSet SQLDBC_ResultSet
 

A class for presenting a database result set.

A database result set is generated by executing an SQL statement that queries the database.

Select statements, catalog functions, and some procedures create result sets. For example, the following SQL statement creates a result set containing all the rows and columns of the table DUAL:

SELECT * FROM DUAL

A result set can be empty, which is different from there being no result set at all. For example, the following SQL statement creates an empty result set:

SELECT * FROM DUAL WHERE 1 = 2

An SQLDBC_ResultSet object maintains a cursor pointing to its current row of data. Initially the cursor is positioned before the first row. The next() method moves the cursor to the next row, and as it returns SQLDBC_NO_DATA_FOUND when there are no more rows in the SQLDBC_ResultSet object, it can be used in a WHILE loop to iterate the result set.

Example for creating an SQLDBC_ResultSet object:

SQLDBC_Statement *stmt = conn->createStatement ();
stmt->execute ("SELECT * FROM DUAL");
SQLDBC_ResultSet *rs = stmt->getResultSet ();
rs->next();

To reduce the time needed for retrieving the data from the database, the SQLDBC_ResultSet class supports so called block cursors, which can return more than one row at a time. The rows returned by a block cursor are called a 'row set'. The result set is fixed, the rowset is not. It changes position and contents each time a new set of rows is retrieved from the database.

With block cursors, the method setRowSetSize() must be used with a parameter greater than 1.

Navigation within the data represented by the SQLDBC_ResultSet object is possible using of navigation methods like first(), next(), previous(), relative() etc.

When block cursors are used, after applying the navigation methods, the cursor points to the actual row set. For example assuming a result set size of 50 and a rowset size of 10, in the following sequence the block cursor points to the rows indicated:

  • first() : Rows 1 - 10 of the result set
  • next() : Rows 11 - 20 of the result set
  • next() : Rows 21 - 30 of the result set
  • previous() : Rows 11 - 20 of the result set
  • last() : Rows 41 - 50 of the result set

In order to perform operations that operate on a single row only when multiple rows have been fetched, the application must indicate which row is the current row. When a block cursor first returns a row set, the current row is the first row of that row set. To change the current row, the application must call the member function setPos().

The data of a certain column in the current row can be retrieved by calling the method getObject().

Data fetched from the database is passed on to the application in variables that the application has allocated for this purpose. Before fetching the data from the database, the application bind these variables to the columns of the result set. Applications can bind any number of columns of the result set, including binding no columns at all.

Binding of columns is done by calling to the member function bindColumn(). The column binding valid for all rows.

After positioning the cursor through navigation methods, the data from the database is written into the bound column variables by a call to the member function fetch() of the row set of this result set. When block cursors are used, the number of rows actually filled can be determined with the member function getResultCount().

For unbounded columns, data can be written into application variables with getObject(), or - in case of block cursors - by calling setPos() on the rowset and then calling getObject().

Definition at line 1584 of file SQLDBC_C.h.

typedef struct SQLDBC_ResultSetMetaData SQLDBC_ResultSetMetaData
 

A SQLDBC_ResultSetMetaData class can retrieve information used to find out types and properties of the columns in a ResultSet.

Definition at line 647 of file SQLDBC_C.h.

typedef struct SQLDBC_RowSet SQLDBC_RowSet
 

An SQLDBC_RowSet class for representing a SQLDBC row set.

A SQLDBC row set is a window on a result set.

The size of the row set is determined by the setRowSetSize() method of the SQLDBC_ResultSet object. The method fetch retrieves the rows from the SQLDBC_RowSet object into the bound columns. The getObject() method retrieves one column from the current row into the given buffer. The setPos() method moves the cursor within the row set.

Definition at line 925 of file SQLDBC_C.h.

typedef struct SQLDBC_SQLWarning SQLDBC_SQLWarning
 

A class for handling SQL warnings.

An SQL warning is a state after an execution of an SQL statement or a function call that is not critical but, as it may cause problems or be an user error. Such an SQL warning may originate from the database, or from the SQLDBC interface.

Definition at line 233 of file SQLDBC_C.h.

typedef struct SQLDBC_Statement SQLDBC_Statement
 

Definition at line 187 of file SQLDBC_C.h.

typedef enum SQLDBC_Statement_ConcurrencyType SQLDBC_Statement_ConcurrencyType
 

typedef enum SQLDBC_Statement_HoldabilityType SQLDBC_Statement_HoldabilityType
 

typedef enum SQLDBC_Statement_ResultSetType SQLDBC_Statement_ResultSetType
 

typedef struct SQLDBC_UpdatableRowSet SQLDBC_UpdatableRowSet
 

A SQLDBC_UpdatableRowSet class for representing a SQLDBC updatable row set.

A SQLDBC updatable row set offers update, insert and delete operations on the underlying result set.

The insertAllRows() and insertOneRow() methods allow inserting either a whole row set or a single row (the first one) of the row set into the parent result set. The method updateRow() updates an arbitrary row of the result set while the method deleteRow() deletes a single row on a given position. The method insertRow() does insert a single row by using the data at the given position.

If the position supplied to insertRow(), updateRow(), or deleteRow() is zero, the insert/update/delete operation is executed for the whole row set.

Definition at line 1168 of file SQLDBC_C.h.


Enumeration Type Documentation

enum ColumnNullBehavior
 

Enumerator:
columnNoNulls  The column must not be NULL values.
columnNullable  The column allows NULL values.
columnNullableUnknown  It is unknown whether the column allows NULL values.

Definition at line 650 of file SQLDBC_C.h.

enum ParameterMode
 

Enumerator:
parameterModeUnknown  The input/output behaviour of the parameter is unknown.
parameterModeIn  The parameter in an input parameter.
parameterModeInOut  The parameter in an input and output parameter.
parameterModeOut  The parameter in an output parameter.

Definition at line 465 of file SQLDBC_C.h.

enum ParameterNullBehavior
 

Enumerator:
parameterNoNulls  The parameter must not be NULL values.
parameterNullable  The parameter allows NULL values.
parameterNullableUnknown  It is unknown whether the parameter allows NULL values.

Definition at line 441 of file SQLDBC_C.h.

enum SQLDBC_Statement_ConcurrencyType
 

Enumerator:
SQLDBC_Statement_ConcurrencyType_CONCUR_UPDATABLE  The result can be updated (FOR UPDATE).
SQLDBC_Statement_ConcurrencyType_CONCUR_READ_ONLY  The result cannot be updated.

Definition at line 2569 of file SQLDBC_C.h.

enum SQLDBC_Statement_HoldabilityType
 

Enumerator:
SQLDBC_Statement_HoldabilityType_CURSOR_HOLD_OVER_COMMIT  The result persists after a COMMIT command.
SQLDBC_Statement_HoldabilityType_CURSOR_CLOSE_ON_COMMIT  The result is closed on COMMIT.

Definition at line 2592 of file SQLDBC_C.h.

enum SQLDBC_Statement_ResultSetType
 

Enumerator:
SQLDBC_Statement_ResultSetType_FORWARD_ONLY  The result set can be scrolled forward only.
SQLDBC_Statement_ResultSetType_SCROLL_SENSITIVE  The content of the result set may change.
SQLDBC_Statement_ResultSetType_SCROLL_INSENSITIVE  The content of the result set cannot not change (FOR REUSE).

Definition at line 2523 of file SQLDBC_C.h.


Function Documentation

SQLDBC_IRuntime* ClientRuntime_GetClientRuntime char *  errorText,
SQLDBC_Int4  errorTextSize
 

Returns a pointer to the client runtime instance.

Two consecutive calls will return the same pointer, as there is only one instance.

Parameters:
errorText If not 0, an occured during initialization of the environment.
errorTextSize The size in bytes of the errorText buffer.
Returns:
A pointer to the client runtime interface or 0 if an error occured.

SQLDBC_IRuntime* ClientRuntime_GetSingleThreadClientRuntime char *  errorText,
SQLDBC_Int4  errorTextSize
 

Returns a pointer to the single-threaded client runtime instance.

Two consecutive calls will return the same pointer, as there is only one instance.

Parameters:
errorText If not 0, an occured during initialization of the environment.
errorTextSize The size in bytes of the errorText buffer.
Returns:
A pointer to the client runtime interface or 0 if an error occured.

char* getSDKVersion  ) 
 

Returns the version of the used SQLDBC API.

It corresponds to the version indicated in the used SQLDBC header.

Returns:
A character string of the format 'SQLDBC.H M.M.C Build 002-000-000-000' containing a complete version string.

SQLDBC_Retcode SQLDBC_Connection_cancel SQLDBC_Connection hdl  ) 
 

Cancels the running database request that is executed on the connection.

For cancellation of a running SQL statement it is neccessary to call the cancel method asynchronously. Because of the asynchronous processing it is not guaranteed that the cancellation will be succeed. The returncode of the original function indicates whether the function completed or was cancelled. In case of cancelation the original function returns with the sql code -102 'SQL statement cancelled'. The the cancel methode returns with SQLDBC_OK if it has been send the cancel request to the database.

Parameters:
hdl [in] an SQLDBC_Connection handle.
Returns:
SQLDBC_OK When the request to cancel the database session was sent, SQLDBC_NO_DATA_FOUND if there was no database session to be cancelled.
Note:
This is an UTF8 string.

void SQLDBC_Connection_clearError SQLDBC_Connection hdl  ) 
 

Deletes the error has been stored.

Parameters:
hdl [in] an SQLDBC_Connection handle.

void SQLDBC_Connection_clearWarnings SQLDBC_Connection hdl  ) 
 

Deletes the warning stored in the SQLWarning object.

Parameters:
hdl [in] an SQLDBC_Connection handle.

SQLDBC_Retcode SQLDBC_Connection_close SQLDBC_Connection hdl  ) 
 

Closes the SQLDBC_Connection.

Releases the database and interface runtime resources immediately instead of waiting for them to be released by the destructor. The current transaction is rolled back.

After you called this method, you are able to connect again using one of the connect methods.

Parameters:
hdl [in] an SQLDBC_Connection handle.
Returns:
SQLDBC_OK When the resources are released. SQLDBC_NOT_OK if there was an error occured.

SQLDBC_Retcode SQLDBC_Connection_commit SQLDBC_Connection hdl  ) 
 

Commits all changes to the database session.

All changes made since the previous COMMIT/ROLLBACK statement are stored, any database locks held by this SQLDBC_Connection object are released.

Parameters:
hdl [in] an SQLDBC_Connection handle.
Returns:
SQLDBC_OK if the COMMIT statement was successfull, SQLDBC_NOT_OK if the COMMIT statment failed, because of an error or timeout.

SQLDBC_Retcode SQLDBC_Connection_commitWorkRelease SQLDBC_Connection hdl  ) 
 

Closes the SQLDBC_Connection.

Releases the database and interface runtime resources immediately instead of waiting for them to be released by the destructor. The current transaction is committed.

Parameters:
hdl [in] an SQLDBC_Connection handle.
Returns:
SQLDBC_OK When the resources are released and the transaction is committed. SQLDBC_NOT_OK if there was an error occured.
After you called this method, you are able to connect again using one of the connect methods.

SQLDBC_Retcode SQLDBC_Connection_connect SQLDBC_Connection hdl,
const char *  servernode,
SQLDBC_Length  servernodeLength,
const char *  serverdb,
SQLDBC_Length  serverdbLength,
const char *  username,
SQLDBC_Length  usernameLength,
const char *  password,
SQLDBC_Length  passwordLength,
const SQLDBC_StringEncodingType_Encoding  userpwdEncoding,
const SQLDBC_ConnectProperties properties
 

Opens a new database session using the SQLDBC_ConnectProperties object.

For the connection options not specified, the following default values are used:

COMPNAME
"R ifr80"
APPLICATION
"ODB"
APPVERSION
"70404"
UNICODE
false
SQLMODE
INTERNAL

Parameters:
hdl [in] an SQLDBC_Connection handle.
servernode The name of the database server (ASCII).
servernodeLength The length in bytes of the database server name.
serverdb The name of the database instance (ASCII).
serverdbLength The length in bytes of the database instance name.
username The name of the database user. The encoding of this string depends on the userpwdEncoding argument.
usernameLength The length in bytes of the database user name.
password The password of the database user. The encoding of this string depends on the userpwdEncoding argument.
passwordLength The length in bytes of the database users password.
userpwdEncoding The character encoding of the username/password combination.
properties Further connection properties.
Returns:
SQLDBC_OK if the connection to the database was established, SQLDBC_NOT_OK if the connection failed. In this case an error is set on this SQLDBC_Connection object.

SQLDBC_Retcode SQLDBC_Connection_connectASCII SQLDBC_Connection hdl,
const char *  servernode,
const char *  serverdb,
const char *  username,
const char *  password,
const SQLDBC_ConnectProperties properties
 

Opens a new database session using the SQLDBC_ConnectProperties object.

This method interprets all character arguments as zero-terminated ASCII strings.

Parameters:
hdl [in] an SQLDBC_Connection handle.
servernode The zero-terminated name of the database server (ASCII).
serverdb The zero-terminated name of the database instance (ASCII).
username The zero-terminated name of the database user (ASCII).
password The zero-terminated password of the database user (ASCII).
properties Further connection properties.
Returns:
SQLDBC_OK if the connection to the database was established, SQLDBC_NOT_OK if the connection failed. In this case an error is set on this SQLDBC_Connection object.

SQLDBC_Retcode SQLDBC_Connection_connectNTS SQLDBC_Connection hdl,
const char *  servernode,
const char *  serverdb,
const char *  username,
const char *  password,
const SQLDBC_StringEncodingType_Encoding  userpwdEncoding,
const SQLDBC_ConnectProperties properties
 

Opens a new database session using the SQLDBC_ConnectProperties object.

This method interpres all character arguments as zero-terminated ASCII strings. User name and password must be in userpwdEncoding code.

Parameters:
hdl [in] an SQLDBC_Connection handle.
servernode The zero-terminated name of the database server (ASCII).
serverdb The zero-terminated name of the database instance (ASCII).
username The zero-terminated name of the database user. The encoding of this string depends on the userpwdEncoding argument.
password The zero-terminated password of the database user. The encoding of this string depends on the userpwdEncoding argument.
userpwdEncoding The character encoding of the username/password combination.
properties Further connection properties.
Returns:
SQLDBC_OK if the connection to the database was established, SQLDBC_NOT_OK if the connection failed. In this case an error is set on this SQLDBC_Connection object.

SQLDBC_Retcode SQLDBC_Connection_connectPROP SQLDBC_Connection hdl,
const SQLDBC_ConnectProperties properties
 

Opens a new database session using the runtime abstraction interface.

This method attaches the connection object an existing session. It is recommended that you implement the virtual method getSession and releaseSession in the Runtime Abstraction Interface.

Parameters:
hdl [in] an SQLDBC_Connection handle.
properties Connection properties.
Returns:
SQLDBC_OK if the connection to the database was established, SQLDBC_NOT_OK if the connection failed. In this case an error is set on this SQLDBC_Connection object.

SQLDBC_PreparedStatement* SQLDBC_Connection_createPreparedStatement SQLDBC_Connection hdl  ) 
 

Creates an SQLDBC_PreparedStatement object for sending SQL statements to the database.

An SQLDBC_PreparedStatement object is 'prepared' in the database server and can use binding variables for input/output parameters.

Parameters:
hdl [in] an SQLDBC_Connection handle.
Returns:
The SQLDBC_PreparedStatement object created by this method.
See also:
SQLDBC_PreparedStatement

SQLDBC_Statement* SQLDBC_Connection_createStatement SQLDBC_Connection hdl  ) 
 

Creates an SQLDBC_Statement object for sending SQL statements to the database.

SQL statements without parameters are normally executed using SQLDBC_Statement objects. Applications executing SQL statements several times or binding parameters for input and/or output must use SQLDBC_PreparedStatement objects.

Parameters:
hdl [in] an SQLDBC_Connection handle.
Returns:
The SQLDBC_Statement object created by this method.
See also:
SQLDBC_Statement

SQLDBC_Retcode SQLDBC_Connection_disconnect SQLDBC_Connection hdl  ) 
 

Closes the SQLDBC_Connection.

Releases the database and interface runtime resources immediately instead of waiting for them to be released by the destructor. No SQL statement that handles the current transaction is sent to the database, so the transaction may be implicitely rolled back by the database server.

After you called this method, you are able to connect again using one of the connect methods.

Parameters:
hdl [in] an SQLDBC_Connection handle.
Returns:
SQLDBC_OK When the resources are released. SQLDBC_NOT_OK if there was an error occured.

SQLDBC_Bool SQLDBC_Connection_getAutoCommit SQLDBC_Connection hdl  ) 
 

Returns whether the connection is in AUTCOMMIT mode.

Parameters:
hdl [in] an SQLDBC_Connection handle.
Returns:
SQLDBC_TRUE if the connection is in AUTOCOMMIT mode or SQLDBC_FALSE if it is not.
See also:
setAutoCommit

SQLDBC_Retcode SQLDBC_Connection_getConnectionFeatures SQLDBC_Connection hdl,
SQLDBC_ConnectProperties properties
 

Retrieve active features of the connection.

This method retrieves the active connection features of the current connection. The active connection features are basically all (explicitely or implicitely) connect properties that have been set if the database kernel can fulfill them.

The method requires that a connection has been established before.

Parameters:
hdl [in] an SQLDBC_Connection handle.
properties Connection properties to fill with current features.
Returns:
SQLDBC_OK if the properties can be retrieved. SQLDBC_NOT_OK if there is an error. In this case an error is set on this SQLDBC_Connection object.

SQLDBC_DateTimeFormat_Format SQLDBC_Connection_getDateTimeFormat SQLDBC_Connection hdl  ) 
 

Returns the currently active date/time format.

Parameters:
hdl [in] an SQLDBC_Connection handle.
Returns:
The date/time format. See SQLDBC_DateTimeFormat_Format

SQLDBC_ErrorHndl* SQLDBC_Connection_getError SQLDBC_Connection hdl  ) 
 

Returns a reference to the ErrorHndl object.

Note:
Applications should retrieve the content of the SQLDBC_ErrorHndl object immediatly since an new call to any SQLDBC function except the warning() method will empty SQLDBC_ErrorHndl object.
Parameters:
hdl [in] an SQLDBC_Connection handle.
Returns:
An SQLDBC_ErrorHndl object.

SQLDBC_Int4 SQLDBC_Connection_getKernelVersion SQLDBC_Connection hdl  ) 
 

Returns the kernel version.

It will be returned in the following format: <major_release><minor_releaser><correction_level>

  • mayor_release (1 digit)
  • minor_release (2 digit)
  • correction_level (2 digits)

Parameters:
hdl [in] an SQLDBC_Connection handle.
Returns:
The kernel version, which is a computed <major_release> * 10000 + <minor_release> * 100 + <correction_level>. Example: For version 7.4.04 version number 70404 is returned.

SQLDBC_Int4 SQLDBC_Connection_getTransactionIsolation SQLDBC_Connection hdl  ) 
 

Returns the transaction isolation level.

Parameters:
hdl [in] an SQLDBC_Connection handle.
Returns:
The isolation level (0, 1, 10, 15, 2, 20, 3, or 30). The lowest level is 0.
See also:
setTransactionIsolation

SQLDBC_SQLWarning* SQLDBC_Connection_getWarning SQLDBC_Connection hdl  ) 
 

Returns a reference to an SQLWarning object stored in the SQLDBC_ConnectionItem object.

Note:
Getting the reference to the SQLWarning object will not clear the ErrorHndl object. All other function calls will empty the ErrorHndl object.
Parameters:
hdl [in] an SQLDBC_Connection handle.
Returns:
The SQLWarning object stored in the item.

SQLDBC_Bool SQLDBC_Connection_isConnected SQLDBC_Connection hdl  ) 
 

Returns whether if the connection to the database was established.

Parameters:
hdl [in] an SQLDBC_Connection handle.
Returns:
SQLDBC_TRUE if the connection was established. It is not checked whether the connection timed out or the database server is still running.

SQLDBC_Bool SQLDBC_Connection_isUnicodeDatabase SQLDBC_Connection hdl  ) 
 

Returns whether the database is an unicode database or not.

Parameters:
hdl [in] an SQLDBC_Connection handle.
Returns:
SQLDBC_TRUE if the database is an unicode database.

void SQLDBC_Connection_releasePreparedStatement SQLDBC_Connection hdl,
SQLDBC_PreparedStatement stmt
 

Releases an SQLDBC_PreparedStatement.

Parameters:
hdl [in] an SQLDBC_Connection handle.
stmt A reference to an SQLDBC_PreparedStatement object to be released.

void SQLDBC_Connection_releaseStatement SQLDBC_Connection hdl,
SQLDBC_Statement stmt
 

Releases an SQLDBC_Statement.

Parameters:
hdl [in] an SQLDBC_Connection handle.
stmt A reference to an SQLDBC_Statement object to be released.

SQLDBC_Retcode SQLDBC_Connection_rollback SQLDBC_Connection hdl  ) 
 

Undoes all changes made in the current transaction and releases any database locks held by this connection object.

Parameters:
hdl [in] an SQLDBC_Connection handle.

void SQLDBC_Connection_setAutoCommit SQLDBC_Connection hdl,
SQLDBC_Bool  autocommit
 

Sets the AUTOCOMMIT mode for the connection.

Parameters:
hdl [in] an SQLDBC_Connection handle.
autocommit The value for AUTOCOMMIT mode.
See also:
getAutoCommit

void SQLDBC_Connection_setSQLMode SQLDBC_Connection hdl,
SQLDBC_SQLMode  sqlmode
 

Sets the SQL mode.

Parameters:
hdl [in] an SQLDBC_Connection handle.
sqlmode The SQL mode to be used: SQLDBC_INTERNAL | SQLDBC_ANSI | SQLDBC_DB2 | SQLDBC_ORACLE
See also:
SQLDBC_ConnectProperties

SQLDBC_Retcode SQLDBC_Connection_setTransactionIsolation SQLDBC_Connection hdl,
SQLDBC_Int4  isolationlevel
 

Sets the transaction isolation level.

Parameters:
hdl [in] an SQLDBC_Connection handle.
isolationlevel The isolation level to be used. Possible values for the isolation level are 0, 1, 10, 15, 2, 20, 3, or 30. The lowest level is 0.
Returns:
SQLDBC_OK if the isolation level was set, SQLDBC_NOT_OK if the isolation level was not set, In this case an error is set on this SQLDBC_Connection object.
See also:
getTransactionIsolation

void SQLDBC_ConnectProperties_delete_SQLDBC_ConnectProperties SQLDBC_ConnectProperties hdl  ) 
 

Deletes the SQLDBC_ConnectProperties handle.

Parameters:
hdl [in] an SQLDBC_ConnectProperties handle.

char* SQLDBC_ConnectProperties_getProperty SQLDBC_ConnectProperties hdl,
const char *  key,
const char *  defaultvalue
 

Retrieves an option.

Parameters:
hdl [in] an SQLDBC_ConnectProperties handle.
key The option key to be requested
defaultvalue The value to be returned. If the option is not found the default value is returned.
Returns:
The value found in the options set, or the default value specified.

SQLDBC_ConnectProperties* SQLDBC_ConnectProperties_new_SQLDBC_ConnectProperties  ) 
 

Creates an empty set of options.

A default allocator is used.

Returns:
a new SQLDBC_ConnectProperties handle.

void SQLDBC_ConnectProperties_setProperty SQLDBC_ConnectProperties hdl,
const char *  key,
const char *  value
 

Sets an option.

Parameters:
hdl [in] an SQLDBC_ConnectProperties handle.
key The option to be set (ASCII string)
value The option value to be set (ASCII string)

SQLDBC_Connection* SQLDBC_Environment_createConnection SQLDBC_Environment hdl  ) 
 

Creates a new SQLDBC_Connection object.

Parameters:
hdl [in] an SQLDBC_Environment handle.
Returns:
A reference to a SQLDBC_Connection object.
See also:
releaseConnection

void SQLDBC_Environment_delete_SQLDBC_Environment SQLDBC_Environment hdl  ) 
 

The destructor.

Parameters:
hdl [in] an SQLDBC_Environment handle.

char* SQLDBC_Environment_getLibraryVersion SQLDBC_Environment hdl  ) 
 

Returns the version of used SQLDBC runtime.

This is the version of the used SQLDBC library. The version of the loaded runtime may differ from the version inidacted in the used header. It is our aim that newer versions of the runtime will run with old applications without the need to be re-compiling.

Parameters:
hdl [in] an SQLDBC_Environment handle.
Returns:
A character string in the format 'libSQLDBC M.M.C Build 002-000-000-000' containing a complete version string of the (shared) linked SQLDBC library.

SQLDBC_Profile* SQLDBC_Environment_getProfile SQLDBC_Environment hdl  ) 
 

Get the profile.

Parameters:
hdl [in] an SQLDBC_Environment handle. return the profile.

void SQLDBC_Environment_getTraceOptions SQLDBC_Environment hdl,
SQLDBC_ConnectProperties traceoptions
 

Retrieves the current tracing options.

Parameters:
hdl [in] an SQLDBC_Environment handle.
traceoptions The options to be set in the trace. See setTraceOptions for a descriptions of the supported trace options.

SQLDBC_Environment* SQLDBC_Environment_new_SQLDBC_Environment SQLDBC_IRuntime runtime  ) 
 

Creates a new SQLDBC_Environment, using the provided interface to the runtime environment.

Parameters:
runtime The runtime to be used, must not be 0. Implement the interface using SQLDBC_IRuntime or use the SQLDBC::GetClientRuntime() in a client application to obtain a valid argument for this constructor.

void SQLDBC_Environment_releaseConnection SQLDBC_Environment hdl,
SQLDBC_Connection connection
 

Closes a SQLDBC_Connection.

Parameters:
hdl [in] an SQLDBC_Environment handle.
connection The SQLDBC_Connection to be closed.
See also:
createConnection

void SQLDBC_Environment_setTraceOptions SQLDBC_Environment hdl,
const SQLDBC_ConnectProperties traceoptions
 

Sets tracing options.

Take care that the trace options may be set process-wide, not only for the this environment instance. Also, some options may be ignored if they are not applicable to the current runtime environment (e.g. setting the name of trace output file).

Parameters:
hdl [in] an SQLDBC_Environment handle.
traceoptions The options to be set in the trace. The following options are supported:
Option>Data TypeDescription
SQL BOOLEAN Enables SQL trace. SQL statements and data are logged.
LONG BOOLEAN Enables long trace. Internal method calls with parameters are logged.
SHORT BOOLEAN Enables short trace. Internal method calls are logged.
PACKET BOOLEAN Enables packet trace. Incoming and outgoing packets are logged.
TIMESTAMP BOOLEAN Precedes each trace output line with a current time stamp.
FILESIZE NUMBER Set the maximum size of the trace file. If not supplied, the size
FILENAME VARCHAR The trace file name.
STOPONERROR BOOLEAN Whether tracing shall stop on when a specific error occurs (see also ERRORCODE and ERRORCOUNT).
ERRORCODE NUMBER If STOPONERROR is set, the error code where the trace output stops.
ERRORCOUNT NUMBER If STOPONERROR is set, number of times the error must occur before the trace stops. If not set, this defaults to 1.

SQLDBC_Int4 SQLDBC_ErrorHndl_getErrorCode SQLDBC_ErrorHndl hdl  ) 
 

Returns the error code from the ErrorHndl object.

Parameters:
hdl [in] an SQLDBC_ErrorHndl.

char* SQLDBC_ErrorHndl_getErrorText SQLDBC_ErrorHndl hdl  ) 
 

Returns the error message stored in the ErrorHndl object.

Note:
This is an UTF8 string.
Parameters:
hdl [in] an SQLDBC_ErrorHndl.

char* SQLDBC_ErrorHndl_getSQLState SQLDBC_ErrorHndl hdl  ) 
 

Returns the SQL state from the ErrorHndl object.

Parameters:
hdl [in] an SQLDBC_ErrorHndl.

SQLDBC_Retcode SQLDBC_LOB_close SQLDBC_LOB hdl  ) 
 

Closes the LOB object.

No further actions can take place.

Parameters:
hdl [in] an SQLDBC_LOB handle.

void SQLDBC_LOB_delete_SQLDBC_LOB SQLDBC_LOB lob  ) 
 

SQLDBC_Retcode SQLDBC_LOB_getData SQLDBC_LOB hdl,
void *  paramAddr,
SQLDBC_Length LengthIndicator,
SQLDBC_Length  Size,
SQLDBC_Bool  Terminate
 

Retrieves the content of the specified LOB column.

The specified LOB column value is converted to the given length and to the output parameter buffer pointed to paramAddr. Repeated calls of this method proceed with reading the LOB value, as long as there is data to read available.

Parameters:
hdl [in] an SQLDBC_LOB handle.
paramAddr A pointer to the parameters output buffer.
LengthIndicator [out] Pointer to a variable that stores the column length or the indicator value SQLDBC_NULL_DATA if the column contains the NULL value. For character data it contains on success the number of bytes copied to the buffer, except the number of bytes necessary for the zero-terminator, if the Terminate flag was set. If the source string exceeds the Size value SQLDBC_DATA_TRUNC will be returned and LengthIndicator is set to the number of bytes (except the terminator bytes) needed to copy without truncation.
Size [in] Length of the parameter buffer in bytes. For character data the Size argument must be large enough to store the terminator byte(s) if the Terminate flag is set.
Terminate [in] Specifies that the output buffer must be finished with a C-style zero-terminator. The Terminate flag works only for the host variable type character (ASCII, UCS2 or UTF8). As a default, all character data is zero-terminated.
Returns:
SQLDBC_OK on success SQLDBC_DATA_TRUNC if the output buffer was too small. SQLDBC_NO_DATA_FOUND if the complete LOB value has been read. SQLDBC_NOT_OK if a database access or conversion error occurred. In this case an error is set in the result set/prepared statement that is related to this object.

SQLDBC_Retcode SQLDBC_LOB_getDataByPos SQLDBC_LOB hdl,
void *  paramAddr,
SQLDBC_Length LengthIndicator,
SQLDBC_Length  Size,
SQLDBC_Length  position,
SQLDBC_Bool  Terminate
 

Retrieves the content of the specified LOB column.

The specified LOB column value is converted to the given length and to the output parameter buffer pointed to paramAddr. After the operation, the internal position is the start position plus the number of characters that have been read.

Parameters:
hdl [in] an SQLDBC_LOB handle.
paramAddr A pointer to the parameters output buffer.
LengthIndicator [out] Pointer to a variable that stores the column length or the indicator value SQLDBC_NULL_DATA if the column contains the NULL value. For character data it contains on success the number of bytes copied to the buffer, except the number of bytes necessary for the zero-terminator, if the Terminate flag was set. If the source string exceeds the Size value SQLDBC_DATA_TRUNC will be returned and LengthIndicator is set to the number of bytes (except the terminator bytes) needed to copy without truncation.
Size [in] Length of the parameter buffer in bytes. For character data the Size argument must be large enough to store the terminator byte(s) if the Terminate flag is set.
position The start position from where to read.
Terminate [in] Specifies that the output buffer must be finished with a C-style zero-terminator. The Terminate flag works only for the host variable type character (ASCII, UCS2 or UTF8). As a default, all character data is zero-terminated.
Returns:
SQLDBC_OK on success SQLDBC_DATA_TRUNC if the output buffer was too small. SQLDBC_NO_DATA_FOUND if the complete LOB value has been read, or if the given position is outside the boundaries of the value. SQLDBC_NOT_OK if a database access or conversion error occurred. In this case an error is set in the result set/prepared statement that is related to this object.

SQLDBC_Length SQLDBC_LOB_getLength SQLDBC_LOB hdl  ) 
 

Retrieves the length of this LOB in the database.

The length is returned in chars. The LOB must be opened for reading to retrieve this value.

Parameters:
hdl [in] an SQLDBC_LOB handle.
Returns:
The length of the LOB in the database, or -1 if that information is not available. If the LOB is a NULL value, 0 is returned.

SQLDBC_Length SQLDBC_LOB_getPosition SQLDBC_LOB hdl  ) 
 

Get the current read/write position.

Parameters:
hdl [in] an SQLDBC_LOB handle.
Returns:
The current read/write position in characters. The read/write position starts with 1. If there is no position available, 0 is returned.

SQLDBC_Length SQLDBC_LOB_getPreferredDataSize SQLDBC_LOB hdl  ) 
 

Retrieves the optimal size of data for reading or writing (the maximum size that can be transferred with one call to the database server).

An application may use this to optimize the communication, by using buffers that are multiples of the preferred size.

Parameters:
hdl [in] an SQLDBC_LOB handle.
Returns:
The optimal data size, or 0 if this size is not available (because the LOB is closed).

SQLDBC_LOB* SQLDBC_LOB_new_SQLDBC_LOB  ) 
 

SQLDBC_Retcode SQLDBC_LOB_putData SQLDBC_LOB hdl,
void *  paramAddr,
SQLDBC_Length paramLengthIndicator
 

Put data into a LOB value that is referenced by this LOB object.

Parameters:
hdl [in] an SQLDBC_LOB handle.
paramAddr Pointer to the data which is to be assigned to the LOB value. The type of the data
paramLengthIndicator [in] Pointer to parameter length or indicator.
Returns:
See also:
nextParameter

SQLDBC_Retcode SQLDBC_LOB_setKeepAlive SQLDBC_LOB hdl,
SQLDBC_Bool  keepalive
 

Sets the keepalive behaviour of an existing LOB.

A LOB is usually kept open for reading as long as there is no navigation on the result set that leads to an invalidation of the current row set. If the flag is set to true, the LOB will be kept alive until it is explicitely closed, the cursor is closed, or a transaction command (commit/rollback) is issued.

Parameters:
hdl [in] an SQLDBC_LOB handle.
keepalive Whether the LOB should be kept. If it is set to and the LOB is already kept over its usual lifetime (see above), it is closed immediately.
Returns:
SQLDBC_OK on success, SQLDBC_NOT_OK on error, e.g. when the LOB is already closed, or the LOB was opened for writing.

SQLDBC_Int2 SQLDBC_ParameterMetaData_getParameterCount SQLDBC_ParameterMetaData hdl  ) 
 

Returns the number of parameter/columns in the PreparedStatement or ResultSet object.

Parameters:
hdl [in] an SQLDBC_ParameterMetaData handle.
Returns:
The number of parameter or columns.

SQLDBC_Int4 SQLDBC_ParameterMetaData_getParameterLength SQLDBC_ParameterMetaData hdl,
SQLDBC_Int2  param
 

Returns the maximum width in characters of the data type of the specified parameter.

Parameters:
hdl [in] an SQLDBC_ParameterMetaData handle.
param Index of the parameter. The first parameter is number 1, the second is number 2, ...
Returns:
The maximum width in bytes of the data type of the specified parameter

ParameterMode SQLDBC_ParameterMetaData_getParameterMode SQLDBC_ParameterMetaData hdl,
SQLDBC_Int2  param
 

Returns the input/output behaviour of the specified parameter.

Parameters:
hdl [in] an SQLDBC_ParameterMetaData handle.
param Index of the parameter. The first parameter is number 1, the second is number 2, ...
Returns:
The input/output behaviour of the parameter data type; Possible values are: parameterModeIn, parameterModeOut or parameterModeInOut.

SQLDBC_Retcode SQLDBC_ParameterMetaData_getParameterName SQLDBC_ParameterMetaData hdl,
SQLDBC_Int2  param,
char *  buffer,
SQLDBC_StringEncodingType_Encoding  encoding,
SQLDBC_Length  bufferSize,
SQLDBC_Length bufferLength
 

Requests the name of the specified parameter.

Note:
This method is meant for usage in connection with calling db-procedures. For common insert commands, no name is returned.
Parameters:
hdl [in] an SQLDBC_ParameterMetaData handle.
param Index of the parameter. The first parameter is number 1, the second is number 2, ...
buffer The buffer to store the name
encoding The code of the name of the specified parameter
bufferSize The buffer size in bytes of the buffer.
bufferLength [out] The number of bytes stored in the buffer, not included the number of bytes necessary for the zero-terminator. If the source string exceeds the bufferSize value SQLDBC_DATA_TRUNC is returned and the bufferLength is set to the number of bytes required to store the name without truncation (not included the number of bytes necessary for the zero-terminator).
Returns:
SQLDBC_OK on success, SQLDBC_DATA_TRUNC if the buffer is too small.

SQLDBC_SQLType SQLDBC_ParameterMetaData_getParameterType SQLDBC_ParameterMetaData hdl,
SQLDBC_Int2  param
 

Returns the data type of the specified parameter.

Parameters:
hdl [in] an SQLDBC_ParameterMetaData handle.
param Index of the parameter. The first parameter is number 1, the second is number 2, ...
Returns:
Data type of the parameter

SQLDBC_Int4 SQLDBC_ParameterMetaData_getPhysicalLength SQLDBC_ParameterMetaData hdl,
SQLDBC_Int2  param
 

Returns maximum physical width in bytes of the data type of the specified parameter.

Parameters:
hdl [in] an SQLDBC_ParameterMetaData handle.
param Index of the parameter. The first parameter is number 1, the second is number 2, ...
Returns:
Maximum physical width in bytes of the data type of the specified parameter.

SQLDBC_Int4 SQLDBC_ParameterMetaData_getPrecision SQLDBC_ParameterMetaData hdl,
SQLDBC_Int2  param
 

Returns the number of decimal digits of the data type of the specified parameter.

For number types, getPrecision() returns the number of decimal digits. For character types, it returns the maximum length in characters. For binary types, it returns the maximum length in bytes.

Parameters:
hdl [in] an SQLDBC_ParameterMetaData handle.
param Index of the parameter. The first parameter is number 1, the second is number 2, ...
Returns:
The number of decimal digits of the data type of the specified parameter.

SQLDBC_Int4 SQLDBC_ParameterMetaData_getScale SQLDBC_ParameterMetaData hdl,
SQLDBC_Int2  param
 

Returns the number of decimal places of the data type of the specified parameter.

For none numeric types, the scale is set to zero.

Parameters:
hdl [in] an SQLDBC_ParameterMetaData handle.
param Index of the parameter. The first parameter is number 1, the second is number 2, ...
Returns:
Number of decimal places of the data type of the specified parameter.

ParameterNullBehavior SQLDBC_ParameterMetaData_isNullable SQLDBC_ParameterMetaData hdl,
SQLDBC_Int2  param
 

Returns whether NULL values are allowed for the specified parameter values.

Parameters:
hdl [in] an SQLDBC_ParameterMetaData handle.
param Index of the parameter. The first parameter is number 1, the second is number 2, ...
Returns:
Whether NULL values are allowed for the specified parameter; Possible values are parameterNoNulls, parameterNullable or parameterNullableUnknown

SQLDBC_Retcode SQLDBC_PreparedStatement_bindParameter SQLDBC_PreparedStatement hdl,
const SQLDBC_UInt2  Index,
const SQLDBC_HostType  Type,
void *  paramAddr,
SQLDBC_Length LengthIndicator,
const SQLDBC_Length  Size,
const SQLDBC_Bool  Terminate
 

Binds a user supplied memory buffer to an input and/or output parameter of an SQL statement.

A parameter is a '?' or ':<name>' placeholder in an SQL statement. Applications should use SQLDBC_ParameterMetadata to retrieve information about the type and length of the parameters in an SQL statement.

Parameters:
hdl [in] an SQLDBC_PreparedStatement handle.
Index [in] Index of the parameter, starting with 1
Type [in] Host type of the parameter
paramAddr [in] A pointer to a buffer for the parameter's data
LengthIndicator [in|out] Pointer to parameter length or indicator.
  • Input parameter:
    For non-integral (character and binary data) input parameters, The LengthIndicator argument must specify the length of the parameter data in bytes, or the indicator value SQLDBC_NULL_DATA to assign a NULL value to a column. The parameter length may also be given by the special length SQLDBC_NTS or by passing a NULL pointer argument when the buffer points to a zero-terminated character string. If the Size argument is not zero SQLDBC computes the number bytes by searching the terminator character in first Size bytes. If the value of Size is zero SQLDBC searches an unlimited number of bytes for the occurrences of a termination character to determine the length.
  • Output parameter:
    For output parameters, LengthIndicator stores the column length or the indicator value SQLDBC_NULL_DATA if the column contains the NULL value. For character data it contains on success the number of bytes copied to the buffer, except the number of bytes necessary for the zero-terminator, if the Terminate flag was set. If the source string exceeds the Size value SQLDBC_DATA_TRUNC will be returned and LengthIndicator is set to the number of bytes (except the terminator bytes) needed to copy without truncation.
Size [in] Byte length of the parameter
Terminate [in] Specifies that the output buffer must be finished with a C-style zero-terminator. The Terminate flag works only for the non-integral character hostvar types (SQLDBC_HOSTTYPE_ASCII, SQLDBC_HOSTTYPE_UCS2 or SQLDBC_HOSTTYPE_UTF8).
Returns:
SQLDBC_OK always
See also:
clearParameter

SQLDBC_Retcode SQLDBC_PreparedStatement_bindParameterAddr SQLDBC_PreparedStatement hdl,
const SQLDBC_UInt2  Index,
const SQLDBC_HostType  Type,
void *  paramAddr,
SQLDBC_Length LengthIndicator,
const SQLDBC_Length  Size,
const SQLDBC_Bool  Terminate
 

Binds an input and/or output parameter by address.

Binding by adress is useful when the application uses buffers that are allocated as an array of pointers (C function calloc)

A parameter is a '?' or ':<name>' placeholder in an SQL statement. Applications should use SQLDBC_ParameterMetadata to retrieve information about the type and length of the parameters in a SQL statement.

Parameters:
hdl [in] an SQLDBC_PreparedStatement handle.
Index [in] Index of the parameter, starting with 1.
Type [in] Host type of the parameter
paramAddr [in] Pointer to a pointer for the parameter's data.
LengthIndicator [in|out] Pointer to parameter length or indicator.
  • Input parameter:
    For non-integral (character and binary data) input parameters, The LengthIndicator argument must specify the length of the parameter data in bytes, or the indicator value SQLDBC_NULL_DATA to assign a NULL value to a column. The parameter length may also be given by the special length SQLDBC_NTS or by passing a NULL pointer argument when the buffer points to a zero-terminated character string. If the Size argument is not zero SQLDBC computes the number bytes by searching the terminator character in first Size bytes. If the value of Size is zero SQLDBC searches an unlimited number of bytes for the occurrences of a termination character to determine the length.
  • Output parameter:
    For output parameters, LengthIndicator stores the column length or the indicator value SQLDBC_NULL_DATA if the column contains the NULL value. For character data it contains on success the number of bytes copied to the buffer, except the number of bytes necessary for the zero-terminator, if the Terminate flag was set. If the source string exceeds the Size value SQLDBC_DATA_TRUNC will be returned and LengthIndicator is set to the number of bytes (except the terminator bytes) needed to copy without truncation.
Size [in] Byte length of the parameter
Terminate [in] Specifies that the output buffer must be finished with a C-style zero-terminator. The Terminate flag works only for the non-integral character hostvar types (SQLDBC_HOSTTYPE_ASCII, SQLDBC_HOSTTYPE_UCS2 or SQLDBC_HOSTTYPE_UTF8).
Returns:
SQLDBC_OK always
See also:
clearParameter

void SQLDBC_PreparedStatement_clearBatch SQLDBC_PreparedStatement hdl  ) 
 

Clears the array of batched statements.

Parameters:
hdl [in] an SQLDBC_PreparedStatement handle.

void SQLDBC_PreparedStatement_clearError SQLDBC_PreparedStatement hdl  ) 
 

Deletes the error has been stored.

Parameters:
hdl [in] an SQLDBC_PreparedStatement handle.

SQLDBC_Retcode SQLDBC_PreparedStatement_clearParameters SQLDBC_PreparedStatement hdl  ) 
 

Clears the information about parameters.

All information about parameters that have been bound before using either the bindParameter or the bindParameterAddr method is cleared.

Parameters:
hdl [in] an SQLDBC_PreparedStatement handle.
Returns:
SQLDBC_OK on success, SQLDBC_NOT_OK if the statement is currently executing a statement having data at execute parameters.
See also:
bindParameter

void SQLDBC_PreparedStatement_clearWarnings SQLDBC_PreparedStatement hdl  ) 
 

Deletes the warning stored in the SQLWarning object.

Parameters:
hdl [in] an SQLDBC_PreparedStatement handle.

SQLDBC_Retcode SQLDBC_PreparedStatement_executeASCII SQLDBC_PreparedStatement hdl  ) 
 

Executes a prepared SQL statement.

The SQL statement must be prepared beforehand, and the appropriate binding variables must have been set with the bindParameter() member function.

Parameters:
hdl [in] an SQLDBC_PreparedStatement handle.
Returns:
  • SQLDBC_OK if successful,
  • SQLDBC_NOT_OK otherwise, In case of an error the SQLDBC_ErrorHndl object, to be queried using error(), of this object is set.
  • SQLDBC_NEED_DATA if the application is to provide the data using a nextParameter() - putData() sequence.

SQLDBC_Retcode SQLDBC_PreparedStatement_executeBatch SQLDBC_PreparedStatement hdl  ) 
 

Executes the statements previously input via addBatch().

Parameters:
hdl [in] an SQLDBC_PreparedStatement handle.
Returns:
SQLDBC_OK on success, SQLDBC_NOT_OK on error, SQLDBC_NO_DATA_FOUND if there are no SQL statements to execute.

SQLDBC_UInt4 SQLDBC_PreparedStatement_getBatchSize SQLDBC_PreparedStatement hdl  ) 
 

Returns the size of the row status array.

Parameters:
hdl [in] an SQLDBC_PreparedStatement handle.
Returns:
The number of elements of the row status array, which is also the number of array elements that are used for batch execution.

SQLDBC_Retcode SQLDBC_PreparedStatement_getCursorName SQLDBC_PreparedStatement hdl,
char *  buffer,
const SQLDBC_StringEncodingType_Encoding  encoding,
const SQLDBC_Length  bufferSize,
SQLDBC_Length bufferLength
 

Retrieves the cursor name.

The cursor name may be set by:

  • The setCursorName() member function
  • A named query statement
  • A database procedure returning a result table

Parameters:
hdl [in] an SQLDBC_PreparedStatement handle.
buffer The buffer into which the zero-terminated cursor name is copied.
encoding Encoding of the buffer where the cursor name is stored.
bufferSize Maximum size of the buffer in bytes.
bufferLength [out] Number of bytes copied to the buffer, except the number of bytes necessary for the zero-terminator. If the source string exceeds the bufferSize. SQLDBC_DATA_TRUNC will be returned and the bufferLength set to the number of bytes (except terminator bytes) needed to copy without truncation.
Returns:
SQLDBC_OK on success, SQLDBC_DATA_TRUNC if the provided buffer wasn't able store the complete name.
See also:
setCursorName

SQLDBC_ErrorHndl* SQLDBC_PreparedStatement_getError SQLDBC_PreparedStatement hdl  ) 
 

Returns a reference to the ErrorHndl object.

Note:
Applications should retrieve the content of the SQLDBC_ErrorHndl object immediatly since an new call to any SQLDBC function except the warning() method will empty SQLDBC_ErrorHndl object.
Parameters:
hdl [in] an SQLDBC_PreparedStatement handle.
Returns:
An SQLDBC_ErrorHndl object.

SQLDBC_Retcode SQLDBC_PreparedStatement_getLastInsertedKey SQLDBC_PreparedStatement hdl,
SQLDBC_Int4  tag,
SQLDBC_HostType  type,
void *  paramAddr,
SQLDBC_Length lengthIndicator,
SQLDBC_Length  size,
SQLDBC_Bool  terminate
 

Retrieves the key that was inserted by the last insert operation.

Parameters:
hdl an SQLDBC_Statement handle.
tag The tag that describes whether to get the last or the first serial key. One of SQLDBC_FIRST_INSERTED_SERIAL, SQLDBC_LAST_INSERTED_SERIAL.
type The output host type.
paramAddr The parameter address.
lengthIndicator The length or indicator value.
size The size of the output parameter, in bytes.
terminate Whether output strings are terminated. Default is SQLDBC_TRUE.
Returns:
SQLDBC_OK, if the value is returned, SQLDBC_NOT_OK if an error is set, SQLDBC_NO_DATA_FOUND if the statement didn't inserted any key, or didn't report them to the interface.

SQLDBC_UInt4 SQLDBC_PreparedStatement_getMaxRows SQLDBC_PreparedStatement hdl  ) 
 

Returns the maximum number of rows allowed in a result set.

This value may be set with setMaxRows before the execution of an SQL statement.

Parameters:
hdl [in] an SQLDBC_PreparedStatement handle.
Returns:
Maximum number of rows of a result set.
See also:
setMaxRows

SQLDBC_Retcode SQLDBC_PreparedStatement_getObject SQLDBC_PreparedStatement hdl,
SQLDBC_Int4  Index,
SQLDBC_HostType  Type,
void *  paramAddr,
SQLDBC_Length LengthIndicator,
SQLDBC_Length  Size,
SQLDBC_Bool  Terminate
 

Retrieves and converts the value of the specified output column of the current row to a buffer.

The specified column value in the current row of this SQLDBC_PreparedStatement object is converted to the given length and SQLDBC_HostType and written to the output parameter buffer pointed to paramAddr.

It can be called multiple times to retrieve character or binary data in parts. For fixed-length datatypes getObject retrieves the same data multiple times. Mixing variable-length datatypes and fixed-length datatypes may produce unexpected results.

Parameters:
hdl [in] an SQLDBC_PreparedStatement handle.
Index Index of the column. The first column is column number 1, the second is column number 2, ...
Type Parameter type of the output buffer.
paramAddr A pointer to the parameters output buffer.
LengthIndicator [out] Pointer to a variable that stores the column length or the indicator value SQLDBC_NULL_DATA if the column contains the NULL value. For character data it contains on success the number of bytes copied to the buffer, except the number of bytes necessary for the zero-terminator, if the Terminate flag was set. If the source string exceeds the Size value SQLDBC_DATA_TRUNC will be returned and LengthIndicator is set to the number of bytes (except the terminator bytes) needed to copy without truncation.
Size [in] Length of the parameter buffer in bytes. The Size argument is only necessary for non-integral data types. For character data the Size argument must be large enough to store the terminator byte(s) if the Terminate flag is set.
Terminate [in] Specifies that the output buffer must be finished with a C-style zero-terminator. The Terminate flag works only for the host var type character (ASCII, UCS2 or UTF8). As a default, all character data is zero-terminated.
Returns:
SQLDBC_OK on success SQLDBC_DATA_TRUNC if the output buffer was too small. SQLDBC_NOT_OK if a database access or conversion error occurred. In this case an error is set on this SQLDBC_PreparedStatement object.
See also:
bindColumn

SQLDBC_Retcode SQLDBC_PreparedStatement_getObjectByPos SQLDBC_PreparedStatement hdl,
SQLDBC_Int4  Index,
SQLDBC_HostType  Type,
void *  paramAddr,
SQLDBC_Length LengthIndicator,
SQLDBC_Length  Size,
SQLDBC_Length  StartPos,
SQLDBC_Bool  Terminate
 

Retrieves and converts the value with an start offset in of the specified output column from a of the current row to a buffer.

The specified column value in the current row of this SQLDBC_PreparedStatement object is converted to the given length and SQLDBC_HostType and written to the output parameter buffer pointed to paramAddr.

It can be called multiple times to retrieve character or binary data in parts. For fixed-length datatypes getObject retrieves the same data multiple times. Mixing variable-length datatypes and fixed-length datatypes may produce unexpected results.

Parameters:
hdl [in] an SQLDBC_PreparedStatement handle.
Index Index of the column. The first column is column number 1, the second is column number 2, ...
Type Parameter type of the output buffer.
paramAddr A pointer to the parameters output buffer.
LengthIndicator [out] Pointer to a variable that stores the column length or the indicator value SQLDBC_NULL_DATA if the column contains the NULL value. For character data it contains on success the number of bytes copied to the buffer, except the number of bytes necessary for the zero-terminator, if the Terminate flag was set. If the source string exceeds the Size value SQLDBC_DATA_TRUNC will be returned and LengthIndicator is set to the number of bytes (except the terminator bytes) needed to copy without truncation.
Size [in] Length of the parameter buffer in bytes. The Size argument is only necessary for non-integral data types. For character data the Size argument must be large enough to store the terminator byte(s) if the Terminate flag is set.
StartPos [in] Start position in the column from which on the data should be retrieved. Start position is counted in bytes from 1. Negative StartPos counts from the end of the column.
Terminate [in] Specifies that the output buffer must be finished with a C-style zero-terminator. The Terminate flag works only for the host var type character (ASCII, UCS2 or UTF8). As a default, all character data is zero-terminated.
Returns:
SQLDBC_OK on success SQLDBC_DATA_TRUNC if the output buffer was too small. SQLDBC_NOT_OK if a database access or conversion error occurred. In this case an error is set on this SQLDBC_PreparedStatement object.
See also:
bindColumn

SQLDBC_ParameterMetaData* SQLDBC_PreparedStatement_getParameterMetaData SQLDBC_PreparedStatement hdl  ) 
 

Retrieves an SQLDBC_ParameterMetaData object that contains information about the parameters used.

Parameters:
hdl [in] an SQLDBC_PreparedStatement handle.
Returns:
An SQLDBC_ParameterMetaData object that contains information about the number, types and properties of the SQLDBC_PreparedStatement object's parameters. If the meta data cannot be retrieved, a NULL pointer is returned

SQLDBC_UInt4 SQLDBC_PreparedStatement_getPreferredBatchSize SQLDBC_PreparedStatement hdl  ) 
 

Get the optimum size for batch execution.

Applications that can adjust the size of records delivered at batch execution

Parameters:
hdl [in] an SQLDBC_PreparedStatement handle.
Returns:
The batch size that is preferred by the database for optimum packet usage. This is 4294967295U if the application should deliver as many rows as it can itself handle.
See also:
getBatchSize

setBatchSize

SQLDBC_ResultSet* SQLDBC_PreparedStatement_getResultSet SQLDBC_PreparedStatement hdl  ) 
 

Retrieves a reference to the SQLDBC_ResultSet object.

Parameters:
hdl [in] an SQLDBC_PreparedStatement handle.
Returns:
A reference to an SQLDBC_ResultSet object if the statement object has a result set, NULL otherwise.
See also:
isQuery

SQLDBC_Statement_ConcurrencyType SQLDBC_PreparedStatement_getResultSetConcurrencyType SQLDBC_PreparedStatement hdl  ) 
 

Retrieves the type of the result set concurrency.

There are two kinds of concurrency:

  • The result set can be updated.
  • The result set is read-only (the default).

Parameters:
hdl [in] an SQLDBC_PreparedStatement handle.
Returns:
type of the result set concurrency

SQLDBC_ResultSetMetaData* SQLDBC_PreparedStatement_getResultSetMetaData SQLDBC_PreparedStatement hdl  ) 
 

Retrieves an SQLDBC_ResultSetMetaData object that contains information about the columns of the SQLDBC_ResultSet object.

The SQLDBC_ResultSetMetaData contains information about the columns of the SQLDBC_ResultSet object that will be returned when the SQLDBC_PreparedStatement object is executed. Because an SQLDBC_PreparedStatement object is parsed, it is possible to get information about the ResultSet object that will be returned without having to execute the SQL statement. Consequently, it is possible to use this method with an SQLDBC_PreparedStatement object rather than executing it and then calling the getResultSetMetaData() method on the returned SQLDBC_ResultSet object.

Note:
Using this method may be expensive due to the time needed to retrieve the metadata from the underlying database kernel.
Parameters:
hdl [in] an SQLDBC_PreparedStatement handle.
Returns:
An SQLDBC_ResultSetMetaData object that describes the columns or NULL if the meta data cannot be retrieved.

SQLDBC_Statement_ResultSetType SQLDBC_PreparedStatement_getResultSetType SQLDBC_PreparedStatement hdl  ) 
 

Returns the type of a result set.

If the requested result set type isn't allowed for this SQL statement, the SQLDBC changes it to an allowed one. Check this with getResultSetType() if the execute() member function returns with a warning.

Parameters:
hdl [in] an SQLDBC_PreparedStatement handle.
Returns:
SQLDBC_Statement_ResultSetType_FORWARD_ONLY,
SQLDBC_Statement_ResultSetType_SCROLL_SENSITIVE,
SQLDBC_Statement_ResultSetType_SCROLL_INSENSITIVE
See also:
setResultSetType

SQLDBC_Int4 SQLDBC_PreparedStatement_getRowsAffected SQLDBC_PreparedStatement hdl  ) 
 

Returns the number of rows affected by the executed SQL statement.

This method returns a non-zero value if more than one row was addressed by the SQL statement. If the return value is lower than zero, more than one rows was addressed but the exact number of addressed rows cannot be determined.

Parameters:
hdl [in] an SQLDBC_PreparedStatement handle.
Returns:
Number of addressed rows

SQLDBC_Int4* SQLDBC_PreparedStatement_getRowStatus SQLDBC_PreparedStatement hdl  ) 
 

Returns the row status array.

The row status array describes the state of each row. The size of the row status array is increased by each addBatch() function call.

Parameters:
hdl [in] an SQLDBC_PreparedStatement handle.
Returns:
A pointer to the first element of the row status array.
See also:
addBatch()

SQLDBC_Retcode SQLDBC_PreparedStatement_getTableName SQLDBC_PreparedStatement hdl,
char *  buffer,
const SQLDBC_StringEncodingType_Encoding  encoding,
const SQLDBC_Length  bufferSize,
SQLDBC_Length bufferLength
 

Retrieves the table name (for SELECT FOR UPDATE commands).

Parameters:
buffer The buffer in which into the table name is copied.
encoding Encoding of the buffer where the table name is stored.
hdl [in] an SQLDBC_PreparedStatement handle.
bufferSize Size (in bytes) of the buffer
bufferLength [out] Number of bytes copied to the buffer, except the number of bytes necessary for the zero-terminator. If the source string exceeds the bufferSize value SQLDBC_DATA_TRUNC will be returned and the bufferLength set to the number of bytes (except the terminator bytes) needed to copy the table name without truncation.
Returns:
SQLDBC_OK on success, SQLDBC_DATA_TRUNC if the provided buffer wasn't able to store the complete name.
Deprecated:
This method is deprecated.
Use the methods provided by SQLDBC_ResultSetMetadata to access schema and table name for a result set column.

SQLDBC_SQLWarning* SQLDBC_PreparedStatement_getWarning SQLDBC_PreparedStatement hdl  ) 
 

Returns a reference to an SQLWarning object stored in the SQLDBC_ConnectionItem object.

Note:
Getting the reference to the SQLWarning object will not clear the ErrorHndl object. All other function calls will empty the ErrorHndl object.
Parameters:
hdl [in] an SQLDBC_PreparedStatement handle.
Returns:
The SQLWarning object stored in the item.

SQLDBC_Bool SQLDBC_PreparedStatement_isQuery SQLDBC_PreparedStatement hdl  ) 
 

Checks if the SQL statement is a query.

A statement is a query only if it returns a result set. This can be determined only after execution of the statement object.

Note:
This method is overridden by the SQLDBC_PreparedStatement class, which can determine the query property before the statement is executed.
Parameters:
hdl [in] an SQLDBC_PreparedStatement handle.
Returns:
SQLDBC_TRUE if the statement does produce a result set, SQLDBC_FALSE if not, or if it cannot be determined.
See also:
getResultSet

SQLDBC_Retcode SQLDBC_PreparedStatement_nextParameterByIndex SQLDBC_PreparedStatement hdl,
SQLDBC_Int2 paramIndex,
void **  paramAddr
 

Switches to the input parameter if the application uses data at execute parameters,.

After calling this member function, the paramIndex and the paramAddr parameters are set. The paramIndex parameter is used to select the next parameter that is processed. You cannot process parameters that are bound to LOB columns before all parameters that are bound to non-LOB columns have been processed for a row.

Parameters:
paramIndex Index of the next parameter that shall be processed, or 0 if the application has no preferred next parameter.
hdl [in] an SQLDBC_PreparedStatement handle.
paramAddr The data pointer that was supplied when binding the parameter, plus any offset that originates from a batch execution sequence (including row-wise binding).
Returns:
  • SQLDBC_NEED_DATA if paramIndex and paramAddr contain the index or address of the next parameter that will be delivered using putData().
  • SQLDBC_OK if the last parameter has been processed, and the statement was executed successfully.
  • SQLDBC_NOT_OK if there is an error (in this case, the error of the SQLDBC_PreparedStatement is set).
See also:
putData

SQLDBC_Retcode SQLDBC_PreparedStatement_prepare SQLDBC_PreparedStatement hdl,
const char *  sql,
const SQLDBC_Length  sqlLength,
const SQLDBC_StringEncodingType_Encoding  encoding
 

Parses an ASCII/UNICODE coded SQL statement.

Parameters:
hdl [in] an SQLDBC_PreparedStatement handle.
sql SQL statement to be prepared.
sqlLength Length in bytes of the SQL statement.
encoding Character code of the SQL statement.

SQLDBC_Retcode SQLDBC_PreparedStatement_prepareASCII SQLDBC_PreparedStatement hdl,
const char *  sql
 

Parses a zero-terminated ASCII coded SQL statement.

Parameters:
hdl [in] an SQLDBC_PreparedStatement handle.
sql The zero-terminated string containing the SQL statement to be prepared. The given string must be ASCII coded.
  • SQLDBC_OK if successful,
  • SQLDBC_NOT_OK if parsing of the SQL statement failed In this case an error is set on this SQLDBC_PreparedStatement object

SQLDBC_Retcode SQLDBC_PreparedStatement_prepareNTS SQLDBC_PreparedStatement hdl,
const char *  sql,
const SQLDBC_StringEncodingType_Encoding  encoding
 

Parses an ASCII/UNICODE coded zero-terminated SQL statement.

Parameters:
hdl [in] an SQLDBC_PreparedStatement handle.
sql The zero-terminated string containing the SQL statement to be prepared. The code of the given string depends from the encoding argument.
encoding The character encoding of the sql argument.
  • SQLDBC_OK if successful,
  • SQLDBC_NOT_OK if parsing of the SQL statement failed In this case an error is set on this SQLDBC_PreparedStatement object

SQLDBC_Retcode SQLDBC_PreparedStatement_putData SQLDBC_PreparedStatement hdl,
void *  paramAddr,
SQLDBC_Length paramLengthIndicator
 

Put data for an input parameter.

Parameters:
paramAddr Pointer to the data which is to be assigned to the SQL parameter. The type of the data must match the type assigned by the bindParameter() member function.
hdl [in] an SQLDBC_PreparedStatement handle.
paramLengthIndicator [in] Pointer to parameter length or indicator.
Returns:
See also:
nextParameter

SQLDBC_Retcode SQLDBC_PreparedStatement_setBatchSize SQLDBC_PreparedStatement hdl,
SQLDBC_UInt4  rowarraysize
 

Sets the size of the row array for a batch execute.

Parameters:
hdl [in] an SQLDBC_PreparedStatement handle.
rowarraysize [in] Number of rows for batch execution. A value of 1 specifies single row execution.
Returns:
SQLDBC_OK on success, SQLDBC_NOT_OK otherwise.
See also:
getBatchSize

SQLDBC_Retcode SQLDBC_PreparedStatement_setBindingType SQLDBC_PreparedStatement hdl,
SQLDBC_size_t  size
 

Sets the binding type for parameters.

The value of the parameter offset is normally 0, which implies a column-wise binding. If it is set to a value other than 0, a row-wise binding is applied. So, the address offset of the respective next parameter value is computed differently for column-wise and row-wise binding:

Column-wise Binding
byte length of the parameter
Row-wise Binding
size
Parameters:
hdl [in] an SQLDBC_PreparedStatement handle.
size The parameter offset for row-wise binding, if set to 0, column-wise binding is applied.
Returns:
SQLDBC_OK always.
See also:
bindParameterAddr, clearParameters

SQLDBC_Retcode SQLDBC_PreparedStatement_setCommandInfo SQLDBC_PreparedStatement hdl,
const char *  buffer,
SQLDBC_Length  bufferLength,
SQLDBC_Int4  lineNumber
 

Sets the command info.

Sets the command info and a line number (for example name of programm and current line number). This will be send to the database kernel as part of a parse order. If the kernel runs in a special diagnose mode these information will be stored in a system table and can be used to profile your application. The column info and line number will be unset after the next execute of a SQL statement at this statement handle.

Parameters:
hdl [in] an SQLDBC_Statement handle.
buffer The command info.
bufferLength Length in bytes of the buffer. In case a zero-terminated string passed on in the buffer argument, you can set the bufferLength to SQLDBC_NTS. Set bufferLength to SQLDBC_NULL_DATA if you want to unset the command info and line number.
lineNumber The line number.
Returns:
SQLDBC_OK on success, SQLDBC_DATA_TRUNC if the provided buffer was too long or SQLDBC_NOT_OK in case of an error.

void SQLDBC_PreparedStatement_setCursorName SQLDBC_PreparedStatement hdl,
const char *  buffer,
SQLDBC_Length  bufferLength,
const SQLDBC_StringEncodingType_Encoding  encoding
 

Sets the cursor name.

Setting the cursorname affects only query and database procedure commands. For DDL-, INSERT-, UPDATE- and DELETE- commands setting the cursorname has no effect.

Parameters:
hdl [in] an SQLDBC_PreparedStatement handle.
buffer The new cursor name.
bufferLength Length in bytes of the buffer. In case a zero-terminated string passed on in the buffer argument, you can set the bufferLength to SQLDBC_NTS.
encoding Encoding of the cursor name.
Returns:
none
See also:
getCursorName

void SQLDBC_PreparedStatement_setMaxRows SQLDBC_PreparedStatement hdl,
SQLDBC_UInt4  rows
 

Limits the number of rows of an SQLDBC_ResultSet object.

The number of rows of the result set is truncated if the result of a query statement is larger than this limit. The default setting is 'unlimited' (0). Setting this limit does not affect an already executed SQL statement.

Parameters:
hdl [in] an SQLDBC_PreparedStatement handle.
rows [in] Maximum number of rows of a result set
Returns:
none
See also:
getMaxRows

void SQLDBC_PreparedStatement_setResultSetConcurrencyType SQLDBC_PreparedStatement hdl,
SQLDBC_Statement_ConcurrencyType  type
 

Sets the type of the result set concurrency.

There are two kinds of concurrency:

  • The result set can be updated.
  • The result set is read-only (the default).

Parameters:
hdl [in] an SQLDBC_PreparedStatement handle.
type [in] The result set type. Possible values are:
SQLDBC_Statement_ConcurrencyType_CONCUR_READ_ONLY (default)
SQLDBC_Statement_ConcurrencyType_CONCUR_UPDATABLE
Returns:
none

void SQLDBC_PreparedStatement_setResultSetFetchSize SQLDBC_PreparedStatement hdl,
SQLDBC_Int2  rows
 

Sets the maximum number of be rows that can be fetched at once.

Sets the maximum number of rows to be fetched from a result set. Use this to manipulate the number of rows in the order interface. Use a value > 0 to set the maximum number of rows. Use a value <= 0 to reset this limit to the default value. The default value is 'unlimited' (32767). Setting this value does not affect an already executed SQL statement.

Parameters:
hdl [in] an SQLDBC_PreparedStatement handle.
rows [in] Number of Rows to be fetched.
Returns:
none

void SQLDBC_PreparedStatement_setResultSetType SQLDBC_PreparedStatement hdl,
SQLDBC_Statement_ResultSetType  type
 

Sets the type of a result set.

A result set is only created by a query command.

There are three kind of result sets:

  • The result set can only be scrolled forward.
  • The result set is scrollable but may change.
  • The result set is scrollable and not change (the default)

Parameters:
hdl [in] an SQLDBC_PreparedStatement handle.
type [in] The result set type. Possible values are:
SQLDBC_Statement_ResultSetType_FORWARD_ONLY,
SQLDBC_Statement_ResultSetType_SCROLL_SENSITIVE,
SQLDBC_Statement_ResultSetType_SCROLL_INSENSITIVE (default)
Returns:
none
See also:
getResultSetType
Todo:
Implement this method

void SQLDBC_Profile_collectCounters SQLDBC_Profile hdl  ) 
 

Collects the counter values for all profile counters.

Parameters:
hdl [in] an SQLDBC_Profile handle.

SQLDBC_UInt8 SQLDBC_Profile_getCounter SQLDBC_Profile hdl,
SQLDBC_ProfileCountValues  counter
 

Gets the counter value for the counter specified by counter.

For deatils about the counter values see IFR_ProfileCountValues

Parameters:
hdl [in] an SQLDBC_Profile handle.
counter name
Returns:
the counter value.

void SQLDBC_Profile_resetCounters SQLDBC_Profile hdl  ) 
 

Reset all counters.

Parameters:
hdl [in] an SQLDBC_Profile handle.

SQLDBC_Retcode SQLDBC_ResultSet_absolute SQLDBC_ResultSet hdl,
int  row
 

Moves the cursor to the specified row number in this SQLDBC_ResultSet object.

If the row number is positive, the cursor moves to this specified row number with respect to the beginning of the result set. The first row is row number 1, the second is row number 2, and so on.

If the given row number is negative, the cursor moves to an 'absolute' position with respect to the end of the result set. For example, calling the method absolute(-1) positions the cursor on the last row; calling the method absolute(-2) moves the cursor to the next-to-last row, and so on.

An attempt to position the cursor beyond the first or last row in the result set leaves the cursor before the first row or after the last row.

Parameters:
hdl [in] an SQLDBC_ResultSet handle.
row Row number where the cursor is moved to. A positive number specifies the absolute row number with respect to the beginning of the result set; a negative number specifies a absolute row number respect to the end of the result set.
Returns:
SQLDBC_OK if the cursor is on the result set; SQLDBC_NO_DATA_FOUND otherwise; SQLDBC_NOT_OK if a database access error occurs.

SQLDBC_Retcode SQLDBC_ResultSet_bindColumn SQLDBC_ResultSet hdl,
SQLDBC_UInt4  Index,
SQLDBC_HostType  Type,
void *  paramAddr,
SQLDBC_Length LengthIndicator,
SQLDBC_Length  Size,
SQLDBC_Bool  Terminate
 

Binds a user-supplied memory buffer to an SQL column of a result set.

Applications must use SQLDBC_ResultSetMetadata to retrieve information about the type and length of the columns of a result set.

Parameters:
hdl [in] an SQLDBC_ResultSet handle.
Index [in] Parameter number. The parameter numbers in an SQL statement are, in increasing order, starting with 1.
Type [in] Parametertype of the output buffer
paramAddr [in] A pointer to a buffer for the parameter's data.
LengthIndicator [out] Pointer to a variable that stores the column length or the indicator value SQLDBC_NULL_DATA if the column contains the NULL value. For character data it contains on success the number of bytes copied to the buffer, except the number of bytes necessary for the zero-terminator, if the Terminate flag was set. If the source string exceeds the Size value SQLDBC_DATA_TRUNC will be returned and LengthIndicator is set to the number of bytes (except the terminator bytes) needed to copy without truncation.
Size [in] Length of the parameter buffer in bytes. The Size argument is only necessary for non-integral data types. For character data the Size argument must be large enough to store the terminator byte(s) if the Terminate flag is set.
Terminate [in] Specifies that the output buffer must be finished with a C-style zero-terminator. The Terminate flag works only for the host var type character (ASCII, UCS2 or UTF8). As a default, all character data is zero-terminated.
Returns:
SQLDBC_OK on success
SQLDBC_NOT_OK If a wrong argument value was passed. In this case an error is set on this SQLDBC_ResultSet object.
See also:
getObject
Todo:
: Indicator handling and truncation handling

SQLDBC_Retcode SQLDBC_ResultSet_bindColumnByPos SQLDBC_ResultSet hdl,
SQLDBC_UInt4  Index,
SQLDBC_HostType  Type,
void *  paramAddr,
SQLDBC_Length LengthIndicator,
SQLDBC_Length PositionIndicator,
SQLDBC_Length  Size,
SQLDBC_Bool  Terminate
 

Binds a user-supplied memory buffer to an SQL column of a result set.

Applications must use SQLDBC_ResultSetMetadata to retrieve information about the type and length of the columns of a result set.

Parameters:
hdl [in] an SQLDBC_ResultSet handle.
Index [in] Parameter number. The parameter numbers in an SQL statement are, in increasing order, starting with 1.
Type [in] Parametertype of the output buffer
paramAddr [in] A pointer to a buffer for the parameter's data.
LengthIndicator [out] Pointer to a variable that stores the column length or the indicator value SQLDBC_NULL_DATA if the column contains the NULL value. For character data it contains on success the number of bytes copied to the buffer, except the number of bytes necessary for the zero-terminator, if the Terminate flag was set. If the source string exceeds the Size value SQLDBC_DATA_TRUNC will be returned and LengthIndicator is set to the number of bytes (except the terminator bytes) needed to copy without truncation.
PositionIndicator [in] Pointer to a variable that stores the start position in bytes from which to read non-integral data.
Size [in] Length of the parameter buffer in bytes. The Size argument is only necessary for non-integral datatypes. For character data the Size argument must be large enough to store the terminator byte(s) if the Terminate flag is set.
Terminate [in] Specifies that the output buffer must be finished with a C-style zero-terminator. The Terminate flag works only for the host var type character (ASCII, UCS2 or UTF8). As a default, all character data is zero-terminated.
Returns:
SQLDBC_OK on success
SQLDBC_NOT_OK If a wrong argument value was passed. In this case an error is set on this SQLDBC_ResultSet object.
See also:
getObject
Todo:
: Indicator handling and truncation handling

SQLDBC_Retcode SQLDBC_ResultSet_clearColumns SQLDBC_ResultSet hdl  ) 
 

Clears the information about columns that have been bound.

All information about columns that have been bound before using bindColumn. method is cleared.

Parameters:
hdl [in] an SQLDBC_ResultSet handle.
Returns:
SQLDBC_OK on success.

void SQLDBC_ResultSet_clearError SQLDBC_ResultSet hdl  ) 
 

Deletes the error has been stored.

Parameters:
hdl [in] an SQLDBC_ResultSet handle.

void SQLDBC_ResultSet_clearWarnings SQLDBC_ResultSet hdl  ) 
 

Deletes the warning stored in the SQLWarning object.

Parameters:
hdl [in] an SQLDBC_ResultSet handle.

void SQLDBC_ResultSet_close SQLDBC_ResultSet hdl  ) 
 

Closes this result set.

Further operations are not allowed.

Parameters:
hdl [in] an SQLDBC_ResultSet handle.

SQLDBC_Retcode SQLDBC_ResultSet_first SQLDBC_ResultSet hdl  ) 
 

Moves the cursor to the first row in this SQLDBC_ResultSet object.

Parameters:
hdl [in] an SQLDBC_ResultSet handle.
Returns:
SQLDBC_OK if the cursor is on a valid row; SQLDBC_NO_DATA_FOUND if there are no rows in the result set; SQLDBC_NOT_OK if a database access error occurs or the result set type is FORWARD_ONLY

SQLDBC_ErrorHndl* SQLDBC_ResultSet_getError SQLDBC_ResultSet hdl  ) 
 

Returns a reference to the ErrorHndl object.

Note:
Applications should retrieve the content of the SQLDBC_ErrorHndl object immediatly since an new call to any SQLDBC function except the warning() method will empty SQLDBC_ErrorHndl object.
Parameters:
hdl [in] an SQLDBC_ResultSet handle.
Returns:
An SQLDBC_ErrorHndl object.

SQLDBC_Retcode SQLDBC_ResultSet_getObject SQLDBC_ResultSet hdl,
SQLDBC_Int4  Index,
SQLDBC_HostType  Type,
void *  paramAddr,
SQLDBC_Length LengthIndicator,
SQLDBC_Length  Size,
SQLDBC_Bool  Terminate
 

Retrieves and converts the value of the specified column of the current row to a buffer.

The specified column value in the current row of this SQLDBC_RowSet object is converted to the given length and SQLDBC_HostType and written to the output parameter buffer pointed to paramAddr.

It can be called multiple times to retrieve character or binary data in parts. For fixed-length datatypes getObject retrieves the same data multiple times. Mixing variable-length datatypes and fixed-length datatypes may produce unexpected results.

The current row may be set by a positioning command from SQLDBC_ResultSet (current row = 1) or by the setPos method of the SQLDBC_RowSet object.

Parameters:
hdl [in] an SQLDBC_ResultSet handle.
Index Index of the column. The first column is column number 1, the second is column number 2, ...
Type Parameter type of the output buffer.
paramAddr A pointer to the parameters output buffer.
LengthIndicator [out] Pointer to a variable that stores the column length or the indicator value SQLDBC_NULL_DATA if the column contains the NULL value. For character data it contains on success the number of bytes copied to the buffer, except the number of bytes necessary for the zero-terminator, if the Terminate flag was set. If the source string exceeds the Size value SQLDBC_DATA_TRUNC will be returned and LengthIndicator is set to the number of bytes (except the terminator bytes) needed to copy without truncation.
Size [in] Length of the parameter buffer in bytes. The Size argument is only neccessary for non-integral datatypes. For character data the Size argument must be large enough to store the terminator byte(s) if the Terminate flag is set.
Terminate [in] Specifies that the output buffer must be finished with a C-style zero-terminator. The Terminate flag works only for the host var type character (ASCII, UCS2 or UTF8). As a default, all character data is zero-terminated.
Returns:
SQLDBC_OK on success SQLDBC_DATA_TRUNC if the output buffer was too small. SQLDBC_NOT_OK if a database access or conversion error occursed. In this case an error is set on this SQLDBC_ResultSet object.
See also:
bindColumn

SQLDBC_Retcode SQLDBC_ResultSet_getObjectByPos SQLDBC_ResultSet hdl,
SQLDBC_Int4  Index,
SQLDBC_HostType  Type,
void *  paramAddr,
SQLDBC_Length LengthIndicator,
SQLDBC_Length  Size,
SQLDBC_Length  StartPos,
SQLDBC_Bool  Terminate
 

Retrieves and converts the value with an start offset in of the specified column from a of the current row to a buffer.

The specified column value in the current row of this SQLDBC_RowSet object is converted to the given length and SQLDBC_HostType and written to the output parameter buffer pointed to paramAddr.

It can be called multiple times to retrieve character or binary data in parts. For fixed-length datatypes getObject retrieves the same data multiple times. Mixing variable-length datatypes and fixed-length datatypes may produce unexpected results.

The current row may be set by a positioning command from SQLDBC_ResultSet (current row = 1) or by the setPos method of the SQLDBC_RowSet object.

Parameters:
hdl [in] an SQLDBC_ResultSet handle.
Index Index of the column. The first column is column number 1, the second is column number 2, ...
Type Parameter type of the output buffer.
paramAddr A pointer to the parameters output buffer.
LengthIndicator [out] Pointer to a variable that stores the column length or the indicator value SQLDBC_NULL_DATA if the column contains the NULL value. For character data it contains on success the number of bytes copied to the buffer, except the number of bytes necessary for the zero-terminator, if the Terminate flag was set. If the source string exceeds the Size value SQLDBC_DATA_TRUNC will be returned and LengthIndicator is set to the number of bytes (except the terminator bytes) needed to copy without truncation.
Size [in] Length of the parameter buffer in bytes. The Size argument is only necessary for non-integral datatypes. For character data the Size argument must be large enough to store the terminator byte(s) if the Terminate flag is set.
StartPos [in] Start position in the column from which on the data should be retrieved. Start position is counted in bytes from 1. Negative StartPos counts from the end of the column.
Terminate [in] Specifies that the output buffer must be finished with a C-style zero-terminator. The Terminate flag works only for the host var type character (ASCII, UCS2 or UTF8). As a default, all character data is zero-terminated.
Returns:
SQLDBC_OK on success SQLDBC_DATA_TRUNC if the output buffer was too small. SQLDBC_NOT_OK if a database access or conversion error occurred. In this case an error is set on this SQLDBC_ResultSet object.
See also:
bindColumn

SQLDBC_Int4 SQLDBC_ResultSet_getResultCount SQLDBC_ResultSet hdl  ) 
 

Returns number of rows of the current result set.

Parameters:
hdl [in] an SQLDBC_ResultSet handle.
Returns:
The number of rows in the result set, or -1 if not known.

SQLDBC_ResultSetMetaData* SQLDBC_ResultSet_getResultSetMetaData SQLDBC_ResultSet hdl  ) 
 

Retrieves an SQLDBC_ResultSetMetaData object that contains information about the columns of this SQLDBC_ResultSet object.

Parameters:
hdl [in] an SQLDBC_ResultSet handle.
Returns:
An SQLDBC_ResultSetMetaData object that describes the columns or NULL if the meta data cannot be retrieved.

SQLDBC_UInt4 SQLDBC_ResultSet_getRowNumber SQLDBC_ResultSet hdl  ) 
 

Returns the current row number.

The first row is row number 1, the second row number 2, and so on.

Parameters:
hdl [in] an SQLDBC_ResultSet handle.
Returns:
The current row number or 0 if the cursor is positioned outside the result set.

SQLDBC_RowSet* SQLDBC_ResultSet_getRowSet SQLDBC_ResultSet hdl  ) 
 

Retrieves the SQLDBC_RowSet returned by block cursor operations.

Parameters:
hdl [in] an SQLDBC_ResultSet handle.
Returns:
A reference to an SQLDBC_RowSet object if the SQLDBC_ResultSet object has an SQLDBC_RowSet or NULL otherwise.

SQLDBC_UInt4 SQLDBC_ResultSet_getRowSetSize SQLDBC_ResultSet hdl  ) 
 

Returns the size of the row array of bounded parameters.

Parameters:
hdl [in] an SQLDBC_ResultSet handle.
Returns:
The size of the array of bound parameters
See also:
setRowSetSize

SQLDBC_Statement* SQLDBC_ResultSet_getStatement SQLDBC_ResultSet hdl  ) 
 

Retrieves the SQLDBC_Statement object that belongs to the result set.

Parameters:
hdl [in] an SQLDBC_ResultSet handle.
Returns:
A reference to the SQLDBC_Statement object that generate this result set.

SQLDBC_UpdatableRowSet* SQLDBC_ResultSet_getUpdatableRowSet SQLDBC_ResultSet hdl  ) 
 

Retrieves the SQLDBC_UpdatableRowSet returned by block cursor operations.

Parameters:
hdl [in] an SQLDBC_ResultSet handle.
Returns:
A reference to an SQLDBC_UpdatableRowSet object if the SQLDBC_ResultSet object has an SQLDBC_UpdatableRowSet or NULL otherwise.

SQLDBC_SQLWarning* SQLDBC_ResultSet_getWarning SQLDBC_ResultSet hdl  ) 
 

Returns a reference to an SQLWarning object stored in the SQLDBC_ConnectionItem object.

Note:
Getting the reference to the SQLWarning object will not clear the ErrorHndl object. All other function calls will empty the ErrorHndl object.
Parameters:
hdl [in] an SQLDBC_ResultSet handle.
Returns:
The SQLWarning object stored in the item.

SQLDBC_Bool* SQLDBC_ResultSet_isUpdatable SQLDBC_ResultSet hdl  ) 
 

Returns SQLDBC_TRUE, if the result set is updatable.

Parameters:
hdl [in] an SQLDBC_ResultSet handle.
Returns:
SQLDBC_TRUE or SQLDBC_FALSE

SQLDBC_Retcode SQLDBC_ResultSet_last SQLDBC_ResultSet hdl  ) 
 

Moves the cursor to the last row in this SQLDBC_ResultSet object.

Parameters:
hdl [in] an SQLDBC_ResultSet handle.
Returns:
SQLDBC_OK if the cursor is on a valid row; SQLDBC_NO_DATA_FOUND if there are no rows in the result set; SQLDBC_NOT_OK if a database access error occurs or the result set type is FORWARD_ONLY.

SQLDBC_Retcode SQLDBC_ResultSet_next SQLDBC_ResultSet hdl  ) 
 

Moves the cursor down one row from its current position.

A result set cursor is initially positioned before the first row; the first call of the member function next() positions the cursor to the first row set; the second call positions the cursor on the second row set, and so on.

An SQLDBC_ResultSet object's warning chain is cleared when the next call is done.

Parameters:
hdl [in] an SQLDBC_ResultSet handle.
Returns:
SQLDBC_OK if the new current row is valid; SQLDBC_NO_DATA_FOUND if there are no more rows; SQLDBC_NOT_OK if a database access error occurs

SQLDBC_Retcode SQLDBC_ResultSet_previous SQLDBC_ResultSet hdl  ) 
 

Moves the cursor to the previous row in this SQLDBC_ResultSet object.

Parameters:
hdl [in] an SQLDBC_ResultSet handle.
Returns:
SQLDBC_OK if the cursor is on a valid row; SQLDBC_NO_DATA_FOUND if it is outside the result set; SQLDBC_NOT_OK if a database access error occurs or the result set type is FORWARD_ONLY

SQLDBC_Retcode SQLDBC_ResultSet_relative SQLDBC_ResultSet hdl,
int  relativePos
 

Moves the cursor by a relative number of rows, either positive or negative.

Attempting to move the cursor beyond the first or last row in the result set positions the cursor before or after the first or last row. Calling relative(0) is valid, but does not change the cursor position.

Note:
Calling the method relative(1) is identical to calling the method next(). Calling the method relative(-1) is identical to calling the method previous().
Parameters:
hdl [in] an SQLDBC_ResultSet handle.
relativePos An integer value specifying the number of rows by which the cursor is to be moved from its current position; a positive number moves the cursor forward; a negative number moves the cursor backward.
Returns:
SQLDBC_OK if the cursor is positioned on a row; SQLDBC_NO_DATA_FOUND otherwise; SQLDBC_NOT_OK if a database access error occurs or the result set type is FORWARD_ONLY.

SQLDBC_Retcode SQLDBC_ResultSet_setBindingType SQLDBC_ResultSet hdl,
SQLDBC_size_t  size
 

Sets the binding type for columns.

The value of the parameter offset is normally 0, which implies a column-wise binding. If it is set to a value other than 0, a row-wise binding is applied. So, the address offset of the respective next parameter value is computed differently for column-wise and row-wise binding:

Column-wise Binding
Byte length of the column.
Row-wise Binding
size
Parameters:
hdl [in] an SQLDBC_ResultSet handle
size The column offset for row-wise binding, if set to 0, column-wise binding is applied.
Returns:
SQLDBC_OK always.
See also:
bindParameterAddr

void SQLDBC_ResultSet_setFetchSize SQLDBC_ResultSet hdl,
SQLDBC_Int2  fetchsize
 

Sets the desired fetch size.

The fetch size setting is a hint to the runtime, and not a strict setting such as the row set size. If it is 1, the FETCH statements issued by the library will not be mass statements, making additional functionality, such as updating using the CURRENT OF predicate possible. Use a value = 0 to reset the fetch size to the default value. The default value is 'unlimited' (32767).

Parameters:
hdl [in] an SQLDBC_ResultSet handle.
fetchsize The new fetch size.

void SQLDBC_ResultSet_setRowSetSize SQLDBC_ResultSet hdl,
SQLDBC_UInt4  rowsetsize
 

Sets the size of the row array of bounded parameters.

Parameters:
hdl [in] an SQLDBC_ResultSet handle.
rowsetsize The number of rows.
See also:
getRowSetSize

SQLDBC_Int2 SQLDBC_ResultSetMetaData_getColumnCount SQLDBC_ResultSetMetaData hdl  ) 
 

Returns the number of columns in this ResultSet object.

Parameters:
hdl [in] an SQLDBC_ResultSetMetaData handle.
Returns:
The number of columns in this result set.

SQLDBC_Retcode SQLDBC_ResultSetMetaData_getColumnLabel SQLDBC_ResultSetMetaData hdl,
SQLDBC_Int2  column,
char *  buffer,
SQLDBC_StringEncodingType_Encoding  encoding,
SQLDBC_Length  bufferSize,
SQLDBC_Length bufferLength
 

Requests the label of the specified column.

The label is either the column name, or the alias specified using AS in the SELECT command.

Parameters:
hdl [in] an SQLDBC_ResultSetMetaData handle.
column Index of the column. The first column is number 1, the second is number 2, ...
buffer Buffer where the column label should be copied into
encoding Encoding of the column label that is requested.
bufferSize Size in bytes of the buffer.
bufferLength [out] The number of bytes stored in the buffer, not included the number of bytes necessary for the zero-terminator. If the source string exceeds the bufferSize value SQLDBC_DATA_TRUNC is returned and the bufferLength is set to the number of bytes required to store the name without truncation (not included the number of bytes necessary for the zero-terminator).
Returns:
SQLDBC_OK on success, SQLDBC_DATA_TRUNC if the buffer is too small.

SQLDBC_Int4 SQLDBC_ResultSetMetaData_getColumnLength SQLDBC_ResultSetMetaData hdl,
SQLDBC_Int2  column
 

Returns maximum width in characters of the specified column.

Parameters:
hdl [in] an SQLDBC_ResultSetMetaData handle.
column Index of the column. The first column is number 1, the second is number 2, ...
Returns:
The maximum number of bytes allowed as the width for the column values.

SQLDBC_Retcode SQLDBC_ResultSetMetaData_getColumnName SQLDBC_ResultSetMetaData hdl,
SQLDBC_Int2  column,
char *  buffer,
SQLDBC_StringEncodingType_Encoding  encoding,
SQLDBC_Length  bufferSize,
SQLDBC_Length bufferLength
 

Requests the name of the specified column.

Parameters:
hdl [in] an SQLDBC_ResultSetMetaData handle.
column Index of the column. The first column is number 1, the second is number 2, ...
buffer Buffer where the column name should be copied into
encoding Encoding of the column name that is requested.
bufferSize Size in bytes of the buffer.
bufferLength [out] The number of bytes stored in the buffer, not included the number of bytes necessary for the zero-terminator. If the source string exceeds the bufferSize value SQLDBC_DATA_TRUNC is returned and the bufferLength is set to the number of bytes required to store the name without truncation (not included the number of bytes necessary for the zero-terminator).
Returns:
SQLDBC_OK on success, SQLDBC_DATA_TRUNC if the buffer is too small.

SQLDBC_SQLType SQLDBC_ResultSetMetaData_getColumnType SQLDBC_ResultSetMetaData hdl,
SQLDBC_Int2  column
 

Returns the data type of the specified column.

Parameters:
hdl [in] an SQLDBC_ResultSetMetaData handle.
column Index of the column. The first column is number 1, the second is number 2, ...
Returns:
The Data type of the specified column.

SQLDBC_Int4 SQLDBC_ResultSetMetaData_getPhysicalLength SQLDBC_ResultSetMetaData hdl,
SQLDBC_Int2  column
 

Returns column's maximum physical width in bytes of the specified columns.

Parameters:
hdl [in] an SQLDBC_ResultSetMetaData handle.
column Index of the column. The first column is number 1, the second is number 2, ...
Returns:
Maximum number of bytes allowed as the physically width of the specified column.

SQLDBC_Int4 SQLDBC_ResultSetMetaData_getPrecision SQLDBC_ResultSetMetaData hdl,
SQLDBC_Int2  column
 

Returns the maximum number of decimal digits of the specified column.

For number types, getPrecision retrieves the number of decimal digits. For character types, it retrieves the maximum length in characters. For binary types, it retrieves the maximum length in bytes.

Parameters:
hdl [in] an SQLDBC_ResultSetMetaData handle.
column Index of the column. The first column is number 1, the second is number 2, ...
Returns:
The maximum number of decimal digits for the column values.

SQLDBC_Int4 SQLDBC_ResultSetMetaData_getScale SQLDBC_ResultSetMetaData hdl,
SQLDBC_Int2  column
 

Returns the number of decimal places of the data type of the specified column.

For non-numeric types, the scale is set to zero.

Parameters:
hdl [in] an SQLDBC_ResultSetMetaData handle.
column Index of the column. The first column is number 1, the second is number 2, ...
Returns:
Number of decimal places of the data type of the specified column.

SQLDBC_Retcode SQLDBC_ResultSetMetaData_getSchemaName SQLDBC_ResultSetMetaData hdl,
SQLDBC_Int2  column,
char *  buffer,
SQLDBC_StringEncodingType_Encoding  encoding,
SQLDBC_Length  bufferSize,
SQLDBC_Length bufferLength
 

Requests the schema name of the specified column.

Parameters:
hdl [in] an SQLDBC_ResultSetMetaData handle.
column Index of the column. The first column is number 1, the second is number 2, ...
buffer Buffer where the schema name should be copied into
encoding Encoding of the schema name that is requested.
bufferSize Size in bytes of the buffer.
bufferLength [out] The number of bytes stored in the buffer, not included the number of bytes necessary for the zero-terminator. If the source string exceeds the bufferSize value SQLDBC_DATA_TRUNC is returned and the bufferLength is set to the number of bytes required to store the name without truncation (not included the number of bytes necessary for the zero-terminator).
Returns:
SQLDBC_OK on success, SQLDBC_DATA_TRUNC if the buffer is too small.

SQLDBC_Retcode SQLDBC_ResultSetMetaData_getTableName SQLDBC_ResultSetMetaData hdl,
SQLDBC_Int2  column,
char *  buffer,
SQLDBC_StringEncodingType_Encoding  encoding,
SQLDBC_Length  bufferSize,
SQLDBC_Length bufferLength
 

Requests the table name of the specified column.

Parameters:
hdl [in] an SQLDBC_ResultSetMetaData handle.
column Index of the column. The first column is number 1, the second is number 2, ...
buffer Buffer where the table name should be copied into
encoding Encoding of the table name that is requested.
bufferSize Size in bytes of the buffer.
bufferLength [out] The number of bytes stored in the buffer, not included the number of bytes necessary for the zero-terminator. If the source string exceeds the bufferSize value SQLDBC_DATA_TRUNC is returned and the bufferLength is set to the number of bytes required to store the name without truncation (not included the number of bytes necessary for the zero-terminator).
Returns:
SQLDBC_OK on success, SQLDBC_DATA_TRUNC if the buffer is too small.

ColumnNullBehavior SQLDBC_ResultSetMetaData_isNullable SQLDBC_ResultSetMetaData hdl,
SQLDBC_Int2  column
 

Returns whether NULL values are allowed for the specified column values.

Parameters:
hdl [in] an SQLDBC_ResultSetMetaData handle.
column Index of the column. The first column is number 1, the second is number 2, ...
Returns:
Whether NULL values are allowed for the specified column; Possible values are columnNoNulls, columnNullable or columnNullableUnknown

SQLDBC_Bool SQLDBC_ResultSetMetaData_isWritable SQLDBC_ResultSetMetaData hdl,
SQLDBC_Int2  column
 

Returns whether a write operation is possible on the specified column.

Parameters:
hdl [in] an SQLDBC_ResultSetMetaData handle.
column Index of the column. The first column is number 1, the second is number 2, ...
Returns:
SQLDBC_TRUE if a write operation is possible; SQLDBC_FALSE otherwise

void SQLDBC_RowSet_clearError SQLDBC_RowSet hdl  ) 
 

Deletes the error has been stored.

Parameters:
hdl [in] an SQLDBC_RowSet handle.

void SQLDBC_RowSet_clearWarnings SQLDBC_RowSet hdl  ) 
 

Deletes the warning stored in the SQLWarning object.

Parameters:
hdl [in] an SQLDBC_RowSet handle.

SQLDBC_Retcode SQLDBC_RowSet_fetch SQLDBC_RowSet hdl  ) 
 

Writes the retrieved data to the bound columns.

Parameters:
hdl [in] an SQLDBC_RowSet handle.
Returns:
SQLDBC_OK if successful; SQLDBC_NOT_OK otherwise

SQLDBC_ErrorHndl* SQLDBC_RowSet_getError SQLDBC_RowSet hdl  ) 
 

Returns a reference to the ErrorHndl object.

Note:
Applications should retrieve the content of the SQLDBC_ErrorHndl object immediatly since an new call to any SQLDBC function except the warning() method will empty SQLDBC_ErrorHndl object.
Parameters:
hdl [in] an SQLDBC_RowSet handle.
Returns:
An SQLDBC_ErrorHndl object.

SQLDBC_Retcode SQLDBC_RowSet_getObject SQLDBC_RowSet hdl,
SQLDBC_Int4  Index,
SQLDBC_HostType  Type,
void *  paramAddr,
SQLDBC_Length LengthIndicator,
SQLDBC_Length  Size,
SQLDBC_Bool  Terminate
 

Retrieves and converts the value of the specified column of the current row to a buffer.

The specified column value in the current row of this SQLDBC_RowSet object is converted to the given length and SQLDBC_HostType and written to the output parameter buffer pointed to paramAddr.

It can be called multiple times to retrieve character or binary data in parts. For fixed-length datatypes getObject retrieves the same data multiple times. Mixing variable-length datatypes and fixed-length datatypes may produce unexpected results.

The current row may be set by a positioning command from SQLDBC_ResultSet (current row = 1) or by the setPos method of the SQLDBC_RowSet object.

Parameters:
hdl [in] an SQLDBC_RowSet handle.
Index Index of the column. The first column is column number 1, the second is column number 2, ...
Type Parameter type of the output buffer.
paramAddr A pointer to the parameters output buffer.
LengthIndicator [out] Pointer to a variable that stores the column length or the indicator value SQLDBC_NULL_DATA if the column contains the NULL value. For character data it contains on success the number of bytes copied to the buffer, except the number of bytes necessary for the zero-terminator, if the Terminate flag was set. If the source string exceeds the Size value SQLDBC_DATA_TRUNC will be returned and LengthIndicator is set to the number of bytes (except the terminator bytes) needed to copy without truncation.
Size [in] Length of the parameter buffer in bytes. The Size argument is only necessary for non-integral data types. For character data the Size argument must be large enough to store the terminator byte(s) if the Terminate flag is set.
Terminate [in] Specifies that the output buffer must be finished with a C-style zero-terminator. The Terminate flag works only for the host var type character (ASCII, UCS2 or UTF8). As a default, all character data is zero-terminated.
Returns:
SQLDBC_OK on success SQLDBC_DATA_TRUNC if the output buffer was too small. SQLDBC_NOT_OK if a database access or conversion error occurred. In this case an error is set on this SQLDBC_RowSet object.
See also:
bindColumn

SQLDBC_Retcode SQLDBC_RowSet_getObjectByPos SQLDBC_RowSet hdl,
SQLDBC_Int4  Index,
SQLDBC_HostType  Type,
void *  paramAddr,
SQLDBC_Length LengthIndicator,
SQLDBC_Length  Size,
SQLDBC_Length  StartPos,
SQLDBC_Bool  Terminate
 

Retrieves and converts the value with an start offset in of the specified column from a of the current row to a buffer.

The specified column value in the current row of this SQLDBC_RowSet object is converted to the given length and SQLDBC_HostType and written to the output parameter buffer pointed to paramAddr.

It can be called multiple times to retrieve character or binary data in parts. For fixed-length datatypes getObject retrieves the same data multiple times. Mixing variable-length datatypes and fixed-length datatypes may produce unexpected results.

The current row may be set by a positioning command from SQLDBC_ResultSet (current row = 1) or by the setPos method of the SQLDBC_RowSet object.

Parameters:
hdl [in] an SQLDBC_RowSet handle.
Index Index of the column. The first column is column number 1, the second is column number 2, ...
Type Parameter type of the output buffer.
paramAddr A pointer to the parameters output buffer.
LengthIndicator [out] Pointer to a variable that stores the column length or the indicator value SQLDBC_NULL_DATA if the column contains the NULL value. For character data it contains on success the number of bytes copied to the buffer, except the number of bytes necessary for the zero-terminator, if the Terminate flag was set. If the source string exceeds the Size value SQLDBC_DATA_TRUNC will be returned and LengthIndicator is set to the number of bytes (except the terminator bytes) needed to copy without truncation.
Size [in] Length of the parameter buffer in bytes. The Size argument is only necessary for non-integral data types. For character data the Size argument must be large enough to store the terminator byte(s) if the Terminate flag is set.
StartPos [in] Start position in the column from which on the data should be retrieved. Start position is counted in bytes from 1. Negative StartPos counts from the end of the column.
Terminate [in] Specifies that the output buffer must be finished with a C-style zero-terminator. The Terminate flag works only for the host var type character (ASCII, UCS2 or UTF8). As a default, all character data is zero-terminated.
Returns:
SQLDBC_OK on success SQLDBC_DATA_TRUNC if the output buffer was too small. SQLDBC_NOT_OK if a database access or conversion error occurred. In this case an error is set on this SQLDBC_RowSet object.
See also:
bindColumn

SQLDBC_Int4 SQLDBC_RowSet_getRowsAffected SQLDBC_RowSet hdl  ) 
 

Returns the number of rows written to the bound parameters.

Parameters:
hdl [in] an SQLDBC_RowSet handle.
Returns:
The number of rows fetched with the last fetch() call.
Note:
The number of fetched rows is updated by the next fetch() call. Positioning of the cursor within result set with SQLDBC_ResultSet::next(), SQLDBC_ResultSet::first(), ... does not change the number of rows.

SQLDBC_Int4* SQLDBC_RowSet_getRowStatus SQLDBC_RowSet hdl  ) 
 

Returns the row status array for the last fetch call.

The row status array describes the state of each row. The maximum size of the row status array is given by the setRowSetSize(). The row status array is filled during the fetch() call. The return code of the first row matches to the first member of the row status array.

Parameters:
hdl [in] an SQLDBC_RowSet handle.
Returns:
A pointer to the first element of the row status array.
See also:
setRowSetSize(), getRowsAffected

SQLDBC_SQLWarning* SQLDBC_RowSet_getWarning SQLDBC_RowSet hdl  ) 
 

Returns a reference to an SQLWarning object stored in the SQLDBC_ConnectionItem object.

Note:
Getting the reference to the SQLWarning object will not clear the ErrorHndl object. All other function calls will empty the ErrorHndl object.
Parameters:
hdl [in] an SQLDBC_RowSet handle.
Returns:
The SQLWarning object stored in the item.

SQLDBC_Retcode SQLDBC_RowSet_setPos SQLDBC_RowSet hdl,
SQLDBC_UInt4  pos
 

Sets the cursor to row pos in the SQLDBC_RowSet.

Parameters:
pos Row number within the row set. The first row of a row set is row number one.
hdl [in] an SQLDBC_RowSet handle.
Returns:
SQLDBC_OK if the cursor is positioned on a row; SQLDBC_NO_DATA_FOUND otherwise; SQLDBC_NOT_OK if a database access error occurs or the result set type is FORWARD_ONLY.

SQLDBC_SQLWarning* SQLDBC_SQLWarning_getNextWarning SQLDBC_SQLWarning hdl  ) 
 

Returns the next SQLWarning from the chain.

Parameters:
hdl [in] an SQLDBC_SQLWarning handle.
Returns:
A pointer to the next SQLWarning, or 0 if no SQLWarning exists.

SQLDBC_SQLWarningCode SQLDBC_SQLWarning_getWarningCode SQLDBC_SQLWarning hdl  ) 
 

Returns the warning code of the SQL warning.

Parameters:
hdl [in] an SQLDBC_SQLWarning handle.

SQLDBC_Retcode SQLDBC_Statement_addBatch SQLDBC_Statement hdl,
char *  sql,
SQLDBC_Length  sqlLength,
SQLDBC_StringEncodingType_Encoding  encoding
 

Adds a statement to the batch.

Statements for batched execution must not return result sets.

Parameters:
hdl [in] an SQLDBC_Statement handle.
sql The statement to be added
sqlLength Length in Bytes of the statement
encoding Encoding of the statement
Returns:
SQLDBC_OK on success
See also:
addBatch()

SQLDBC_Retcode SQLDBC_Statement_addBatchASCII SQLDBC_Statement hdl,
char *  sql
 

Adds a statement to the batch.

The must be end with a zero-terminator and in ASCII code.

Parameters:
hdl [in] an SQLDBC_Statement handle.
sql The statement to be added
Returns:
SQLDBC_OK on success

SQLDBC_Retcode SQLDBC_Statement_addBatchNTS SQLDBC_Statement hdl,
char *  sql,
SQLDBC_StringEncodingType_Encoding  encoding
 

Adds a statement to the batch.

The must be end with a zero-terminator.

Parameters:
hdl [in] an SQLDBC_Statement handle.
sql The statement to be added
encoding Encoding of the statement
Returns:
SQLDBC_OK on success

void SQLDBC_Statement_clearBatch SQLDBC_Statement hdl  ) 
 

Clears the array of batched statements.

Parameters:
hdl [in] an SQLDBC_Statement handle.

void SQLDBC_Statement_clearError SQLDBC_Statement hdl  ) 
 

Deletes the error has been stored.

Parameters:
hdl [in] an SQLDBC_Statement handle.

void SQLDBC_Statement_clearWarnings SQLDBC_Statement hdl  ) 
 

Deletes the warning stored in the SQLWarning object.

Parameters:
hdl [in] an SQLDBC_Statement handle.

SQLDBC_Retcode SQLDBC_Statement_execute SQLDBC_Statement hdl,
char *  sql,
SQLDBC_Length  sqlLength,
SQLDBC_StringEncodingType_Encoding  encoding
 

Executes an UNICODE/ASCII coded SQL statement.

The SQL statement is executed immediately on sending a DBS request to the database. In case of an error, the SQLDBC_ErrorHndl object (to be queried using error()) of this object is set. If the executed SQL statement is a query, a result set is created. The application can check this using isQuery(), and obtain retrieve the ResultSet using getResultSet().

Parameters:
hdl [in] an SQLDBC_Statement handle.
sql The SQL statement to be executed. The coding of this string argument depends from the encoding argument.
sqlLength The length in bytes of the of the SQL statement
encoding The character coding of the SQL statement
Returns:
SQLDBC_OK on success, or else SQLDBC_NOT_OK. In this case check the error instance.

SQLDBC_Retcode SQLDBC_Statement_executeASCII SQLDBC_Statement hdl,
char *  sql
 

Executes an ASCII coded zero-terminated SQL statement.

The SQL statement is executed immediately on sending a DBS request to the database. In case of an error, the SQLDBC_ErrorHndl object (to be queried using error()) of this object is set. If the executed SQL statement is a query, a result set is created. The application can check this using isQuery(), and obtain retrieve the resultset using getResultSet().

Parameters:
hdl [in] an SQLDBC_Statement handle.
sql The zero-terminated ASCII coded SQL statement to be execute.
Returns:
SQLDBC_OK on success, or else SQLDBC_NOT_OK. In this case check the error instance.

SQLDBC_Retcode SQLDBC_Statement_executeBatch SQLDBC_Statement hdl  ) 
 

Executes the statements previously input via addBatch().

Parameters:
hdl [in] an SQLDBC_Statement handle.
Returns:
SQLDBC_OK on success, SQLDBC_NOT_OK on error, SQLDBC_NO_DATA_FOUND if there are no SQL statements to execute.

SQLDBC_Retcode SQLDBC_Statement_executeNTS SQLDBC_Statement hdl,
char *  sql,
SQLDBC_StringEncodingType_Encoding  encoding
 

Executes an UNICODE/ASCII coded zero-terminated SQL statement.

The SQL statement is executed immediately on sending a DBS request to the database. In case of an error, the SQLDBC_ErrorHndl object (to be queried using error()) of this object is set. If the executed SQL statement is a query, a result set is created. The application can check this using isQuery(), and obtain retrieve the resultset using getResultSet().

Parameters:
hdl [in] an SQLDBC_Statement handle.
sql The zero-terminated SQL statement to be executed. The coding of this string argument depends from the encoding argument.
encoding The character coding of the SQL statement.
Returns:
SQLDBC_OK on success, or else SQLDBC_NOT_OK. In this case check the error instance.

SQLDBC_UInt4 SQLDBC_Statement_getBatchSize SQLDBC_Statement hdl  ) 
 

Returns the size of the row status array.

Parameters:
hdl [in] an SQLDBC_Statement handle.
Returns:
The number of elements of the row status array, which is also the number of array elements that are used for batch execution.

SQLDBC_Connection* SQLDBC_Statement_getConnection SQLDBC_Statement hdl  ) 
 

Get the SQLDBC connection object that belongs to the statement.

Parameters:
hdl [in] an SQLDBC_Statement handle.

SQLDBC_Retcode SQLDBC_Statement_getCursorName SQLDBC_Statement hdl,
char *  buffer,
SQLDBC_StringEncodingType_Encoding  encoding,
SQLDBC_Length  bufferSize,
SQLDBC_Length bufferLength
 

Retrieves the cursor name.

The cursor name may be set by:

  • The setCursorName() member function
  • A named query statement
  • A database procedure returning a result table

Parameters:
hdl [in] an SQLDBC_Statement handle.
buffer The buffer into which the zero-terminated cursor name is copied.
encoding Encoding of the buffer where the cursor name is stored.
bufferSize Maximum size of the buffer in bytes.
bufferLength [out] Number of bytes copied to the buffer, except the number of bytes necessary for the zero-terminator. If the source string exceeds the bufferSize. SQLDBC_DATA_TRUNC will be returned and the bufferLength set to the number of bytes (except terminator bytes) needed to copy without truncation.
Returns:
SQLDBC_OK on success, SQLDBC_DATA_TRUNC if the provided buffer wasn't able store the complete name.
See also:
setCursorName

SQLDBC_ErrorHndl* SQLDBC_Statement_getError SQLDBC_Statement hdl  ) 
 

Returns a reference to the ErrorHndl object.

Note:
Applications should retrieve the content of the SQLDBC_ErrorHndl object immediatly since an new call to any SQLDBC function except the warning() method will empty SQLDBC_ErrorHndl object.
Parameters:
hdl [in] an SQLDBC_Statement handle.
Returns:
An SQLDBC_ErrorHndl object.

SQLDBC_Int4 SQLDBC_Statement_getKernelVersion SQLDBC_Statement hdl  ) 
 

Gets the kernel version of the connection of the statement.

  • 1 digit major number,
  • 2 digits minor number,
  • 2 digits correction level.

Parameters:
hdl [in] an SQLDBC_Statement handle.
Returns:
SQLDBC_Int4 The kernel version, which is a computed major * 10000 + minor * 100 + correction_level. E.g. version 7.4.4 has the version number 70404.

SQLDBC_Retcode SQLDBC_Statement_getLastInsertedKey SQLDBC_Statement hdl,
SQLDBC_Int4  tag,
SQLDBC_HostType  type,
void *  paramAddr,
SQLDBC_Length lengthIndicator,
SQLDBC_Length  size,
SQLDBC_Bool  terminate
 

Retrieves the key that was inserted by the last insert operation.

Parameters:
hdl [in] an SQLDBC_Statement handle.
tag The tag that describes whether to get the last or the first serial key. One of SQLDBC_FIRST_INSERTED_SERIAL, SQLDBC_LAST_INSERTED_SERIAL.
type The output host type.
paramAddr The parameter address.
lengthIndicator The length or indicator value.
size The size of the output parameter, in bytes.
terminate Whether output strings are terminated. Default is SQLDBC_TRUE.
Returns:
SQLDBC_OK, if the value is returned, SQLDBC_NOT_OK if an error is set, SQLDBC_NO_DATA_FOUND if the statement didn't inserted any key, or didn't report them to the interface.

SQLDBC_UInt4 SQLDBC_Statement_getMaxRows SQLDBC_Statement hdl  ) 
 

Returns the maximum number of rows allowed in a result set.

This value may be set with setMaxRows before the execution of an SQL statement.

Parameters:
hdl [in] an SQLDBC_Statement handle.
Returns:
Maximum number of rows of a result set.
See also:
setMaxRows

SQLDBC_ResultSet* SQLDBC_Statement_getResultSet SQLDBC_Statement hdl  ) 
 

Retrieves a reference to the SQLDBC_ResultSet object.

Parameters:
hdl [in] an SQLDBC_Statement handle.
Returns:
A reference to an SQLDBC_ResultSet object if the statement object has a result set, NULL otherwise.
See also:
isQuery

SQLDBC_Statement_ConcurrencyType SQLDBC_Statement_getResultSetConcurrencyType SQLDBC_Statement hdl  ) 
 

Retrieves the type of the result set concurrency.

There are two kinds of concurrency:

  • The result set can be updated.
  • The result set is read-only (the default).

Parameters:
hdl [in] an SQLDBC_Statement handle.
Returns:
type of the result set concurrency

SQLDBC_Statement_ResultSetType SQLDBC_Statement_getResultSetType SQLDBC_Statement hdl  ) 
 

Returns the type of a result set.

If the requested result set type isn't allowed for this SQL statement, the SQLDBC changes it to an allowed one. Check this with getResultSetType() if the execute() member function returns with a warning.

Parameters:
hdl [in] an SQLDBC_Statement handle.
Returns:
SQLDBC_Statement_ResultSetType_FORWARD_ONLY,
SQLDBC_Statement_ResultSetType_SCROLL_SENSITIVE,
SQLDBC_Statement_ResultSetType_SCROLL_INSENSITIVE
See also:
setResultSetType

SQLDBC_Int4 SQLDBC_Statement_getRowsAffected SQLDBC_Statement hdl  ) 
 

Returns the number of rows affected by the executed SQL statement.

This method returns a non-zero value if more than one row was addressed by the SQL statement. If the return value is lower than zero, more than one rows was addressed but the exact number of addressed rows cannot be determined.

Parameters:
hdl [in] an SQLDBC_Statement handle.
Returns:
Number of addressed rows

SQLDBC_Int4* SQLDBC_Statement_getRowStatus SQLDBC_Statement hdl  ) 
 

Returns the row status array.

The row status array describes the state of each row. The size of the row status array is increased by each addBatch() function call.

Parameters:
hdl [in] an SQLDBC_Statement handle.
Returns:
A pointer to the first element of the row status array.
See also:
addBatch()

SQLDBC_Retcode SQLDBC_Statement_getTableName SQLDBC_Statement hdl,
char *  buffer,
SQLDBC_StringEncodingType_Encoding  encoding,
SQLDBC_Length  bufferSize,
SQLDBC_Length bufferLength
 

Retrieves the table name (for SELECT FOR UPDATE commands).

Parameters:
buffer The buffer in which into the table name is copied.
encoding Encoding of the buffer where the table name is stored.
hdl [in] an SQLDBC_Statement handle.
bufferSize Size (in bytes) of the buffer
bufferLength [out] Number of bytes copied to the buffer, except the number of bytes necessary for the zero-terminator. If the source string exceeds the bufferSize value SQLDBC_DATA_TRUNC will be returned and the bufferLength set to the number of bytes (except the terminator bytes) needed to copy the table name without truncation.
Returns:
SQLDBC_OK on success, SQLDBC_DATA_TRUNC if the provided buffer wasn't able to store the complete name.
Deprecated:
This method is deprecated.
Use the methods provided by SQLDBC_ResultSetMetadata to access schema and table name for a result set column.

SQLDBC_SQLWarning* SQLDBC_Statement_getWarning SQLDBC_Statement hdl  ) 
 

Returns a reference to an SQLWarning object stored in the SQLDBC_ConnectionItem object.

Note:
Getting the reference to the SQLWarning object will not clear the ErrorHndl object. All other function calls will empty the ErrorHndl object.
Parameters:
hdl [in] an SQLDBC_Statement handle.
Returns:
The SQLWarning object stored in the item.

SQLDBC_Bool SQLDBC_Statement_isQuery SQLDBC_Statement hdl  ) 
 

Checks if the SQL statement is a query.

A statement is a query only if it returns a result set. This can be determined only after execution of the statement object.

Note:
This method is overridden by the SQLDBC_PreparedStatement class, which can determine the query property before the statement is executed.
Parameters:
hdl [in] an SQLDBC_Statement handle.
Returns:
SQLDBC_TRUE if the statement does produce a result set, SQLDBC_FALSE if not, or if it cannot be determined.
See also:
getResultSet

SQLDBC_Retcode SQLDBC_Statement_setCommandInfo SQLDBC_Statement hdl,
const char *  buffer,
SQLDBC_Length  bufferLength,
SQLDBC_Int4  lineNumber
 

Sets the command info.

Sets the command info and a line number (for example name of programm and current line number). This will be send to the database kernel as part of a parse order. If the kernel runs in a special diagnose mode these information will be stored in a system table and can be used to profile your application. The column info and line number will be unset after the next execute of a SQL statement at this statement handle.

Parameters:
hdl [in] an SQLDBC_Statement handle.
buffer The command info.
bufferLength Length in bytes of the buffer. In case a zero-terminated string passed on in the buffer argument, you can set the bufferLength to SQLDBC_NTS. Set bufferLength to SQLDBC_NULL_DATA if you want to unset the command info and line number.
lineNumber The line number.
Returns:
SQLDBC_OK on success, SQLDBC_DATA_TRUNC if the provided buffer was too long or SQLDBC_NOT_OK in case of an error.

void SQLDBC_Statement_setCursorName SQLDBC_Statement hdl,
char *  buffer,
SQLDBC_Length  bufferLength,
SQLDBC_StringEncodingType_Encoding  encoding
 

Sets the cursor name.

Setting the cursorname affects only query and database procedure commands. For DDL-, INSERT-, UPDATE- and DELETE- commands setting the cursorname has no effect.

Parameters:
hdl [in] an SQLDBC_Statement handle.
buffer The new cursor name.
bufferLength Length in bytes of the buffer. In case a zero-terminated string passed on in the buffer argument, you can set the bufferLength to SQLDBC_NTS.
encoding Encoding of the cursor name.
Returns:
none
See also:
getCursorName

void SQLDBC_Statement_setMaxRows SQLDBC_Statement hdl,
SQLDBC_UInt4  rows
 

Limits the number of rows of an SQLDBC_ResultSet object.

The number of rows of the result set is truncated if the result of a query statement is larger than this limit. The default setting is 'unlimited' (0). Setting this limit does not affect an already executed SQL statement.

Parameters:
hdl [in] an SQLDBC_Statement handle.
rows [in] Maximum number of rows of a result set
Returns:
none
See also:
getMaxRows

void SQLDBC_Statement_setResultSetConcurrencyType SQLDBC_Statement hdl,
SQLDBC_Statement_ConcurrencyType  type
 

Sets the type of the result set concurrency.

There are two kinds of concurrency:

  • The result set can be updated.
  • The result set is read-only (the default).

Parameters:
hdl [in] an SQLDBC_Statement handle.
type [in] The result set type. Possible values are:
SQLDBC_Statement_ConcurrencyType_CONCUR_READ_ONLY (default)
SQLDBC_Statement_ConcurrencyType_CONCUR_UPDATABLE
Returns:
none

void SQLDBC_Statement_setResultSetFetchSize SQLDBC_Statement hdl,
SQLDBC_Int2  rows
 

Sets the maximum number of be rows that can be fetched at once.

Sets the maximum number of rows to be fetched from a result set. Use this to manipulate the number of rows in the order interface. Use a value > 0 to set the maximum number of rows. Use a value <= 0 to reset this limit to the default value. The default value is 'unlimited' (32767). Setting this value does not affect an already executed SQL statement.

Parameters:
hdl [in] an SQLDBC_Statement handle.
rows [in] Number of Rows to be fetched.
Returns:
none

void SQLDBC_Statement_setResultSetType SQLDBC_Statement hdl,
SQLDBC_Statement_ResultSetType  type
 

Sets the type of a result set.

A result set is only created by a query command.

There are three kind of result sets:

  • The result set can only be scrolled forward.
  • The result set is scrollable but may change.
  • The result set is scrollable and not change (the default).

Parameters:
hdl [in] an SQLDBC_Statement handle.
type [in] The result set type. Possible values are:
SQLDBC_Statement_ResultSetType_FORWARD_ONLY,
SQLDBC_Statement_ResultSetType_SCROLL_SENSITIVE,
SQLDBC_Statement_ResultSetType_SCROLL_INSENSITIVE (default)
Returns:
none
See also:
getResultSetType

void SQLDBC_UpdatableRowSet_clearError SQLDBC_UpdatableRowSet hdl  ) 
 

Deletes the error has been stored.

Parameters:
hdl [in] an SQLDBC_UpdatableRowSet handle.

void SQLDBC_UpdatableRowSet_clearWarnings SQLDBC_UpdatableRowSet hdl  ) 
 

Deletes the warning stored in the SQLWarning object.

Parameters:
hdl [in] an SQLDBC_UpdatableRowSet handle.

SQLDBC_Retcode SQLDBC_UpdatableRowSet_deleteRow SQLDBC_UpdatableRowSet hdl,
SQLDBC_UInt4  position
 

Deletes a single row of the row set at a given position.

Parameters:
hdl [in] an SQLDBC_UpdatableRowSet handle.
position Position in the row set which row has to be deleted.
Returns:
SQLDBC_OK if the row is deleted; SQLDBC_NOT_OK if a database access error occurs or the result set type is FORWARD_ONLY.

SQLDBC_Retcode SQLDBC_UpdatableRowSet_fetch SQLDBC_UpdatableRowSet hdl  ) 
 

Writes the retrieved data to the bound columns.

Parameters:
hdl [in] an SQLDBC_UpdatableRowSet handle.
Returns:
SQLDBC_OK if successful; SQLDBC_NOT_OK otherwise

SQLDBC_ErrorHndl* SQLDBC_UpdatableRowSet_getError SQLDBC_UpdatableRowSet hdl  ) 
 

Returns a reference to the ErrorHndl object.

Note:
Applications should retrieve the content of the SQLDBC_ErrorHndl object immediatly since an new call to any SQLDBC function except the warning() method will empty SQLDBC_ErrorHndl object.
Parameters:
hdl [in] an SQLDBC_UpdatableRowSet handle.
Returns:
An SQLDBC_ErrorHndl object.

SQLDBC_Retcode SQLDBC_UpdatableRowSet_getObject SQLDBC_UpdatableRowSet hdl,
SQLDBC_Int4  Index,
SQLDBC_HostType  Type,
void *  paramAddr,
SQLDBC_Length LengthIndicator,
SQLDBC_Length  Size,
SQLDBC_Bool  Terminate
 

Retrieves and converts the value of the specified column of the current row to a buffer.

The specified column value in the current row of this SQLDBC_UpdatableRowSet object is converted to the given length and SQLDBC_HostType and written to the output parameter buffer pointed to paramAddr.

It can be called multiple times to retrieve character or binary data in parts. For fixed-length datatypes getObject retrieves the same data multiple times. Mixing variable-length datatypes and fixed-length datatypes may produce unexpected results.

The current row may be set by a positioning command from SQLDBC_ResultSet (current row = 1) or by the setPos method of the SQLDBC_UpdatableRowSet object.

Parameters:
hdl [in] an SQLDBC_UpdatableRowSet handle.
Index Index of the column. The first column is column number 1, the second is column number 2, ...
Type Parameter type of the output buffer.
paramAddr A pointer to the parameters output buffer.
LengthIndicator [out] Pointer to a variable that stores the column length or the indicator value SQLDBC_NULL_DATA if the column contains the NULL value. For character data it contains on success the number of bytes copied to the buffer, except the number of bytes necessary for the zero-terminator, if the Terminate flag was set. If the source string exceeds the Size value SQLDBC_DATA_TRUNC will be returned and LengthIndicator is set to the number of bytes (except the terminator bytes) needed to copy without truncation.
Size [in] Length of the parameter buffer in bytes. The Size argument is only necessary for non-integral data types. For character data the Size argument must be large enough to store the terminator byte(s) if the Terminate flag is set.
Terminate [in] Specifies that the output buffer must be finished with a C-style zero-terminator. The Terminate flag works only for the host var type character (ASCII, UCS2 or UTF8). As a default, all character data is zero-terminated.
Returns:
SQLDBC_OK on success SQLDBC_DATA_TRUNC if the output buffer was too small. SQLDBC_NOT_OK if a database access or conversion error occurred. In this case an error is set on this SQLDBC_UpdatableRowSet object.
See also:
bindColumn

SQLDBC_Retcode SQLDBC_UpdatableRowSet_getObjectByPos SQLDBC_UpdatableRowSet hdl,
SQLDBC_Int4  Index,
SQLDBC_HostType  Type,
void *  paramAddr,
SQLDBC_Length LengthIndicator,
SQLDBC_Length  Size,
SQLDBC_Length  StartPos,
SQLDBC_Bool  Terminate
 

Retrieves and converts the value with an start offset in of the specified column from a of the current row to a buffer.

The specified column value in the current row of this SQLDBC_UpdatableRowSet object is converted to the given length and SQLDBC_HostType and written to the output parameter buffer pointed to paramAddr.

It can be called multiple times to retrieve character or binary data in parts. For fixed-length datatypes getObject retrieves the same data multiple times. Mixing variable-length datatypes and fixed-length datatypes may produce unexpected results.

The current row may be set by a positioning command from SQLDBC_ResultSet (current row = 1) or by the setPos method of the SQLDBC_UpdatableRowSet object.

Parameters:
hdl [in] an SQLDBC_UpdatableRowSet handle.
Index Index of the column. The first column is column number 1, the second is column number 2, ...
Type Parameter type of the output buffer.
paramAddr A pointer to the parameters output buffer.
LengthIndicator [out] Pointer to a variable that stores the column length or the indicator value SQLDBC_NULL_DATA if the column contains the NULL value. For character data it contains on success the number of bytes copied to the buffer, except the number of bytes necessary for the zero-terminator, if the Terminate flag was set. If the source string exceeds the Size value SQLDBC_DATA_TRUNC will be returned and LengthIndicator is set to the number of bytes (except the terminator bytes) needed to copy without truncation.
Size [in] Length of the parameter buffer in bytes. The Size argument is only necessary for non-integral data types. For character data the Size argument must be large enough to store the terminator byte(s) if the Terminate flag is set.
StartPos [in] Start position in the column from which on the data should be retrieved. Start position is counted in bytes from 1. Negative StartPos counts from the end of the column.
Terminate [in] Specifies that the output buffer must be finished with a C-style zero-terminator. The Terminate flag works only for the host var type character (ASCII, UCS2 or UTF8). As a default, all character data is zero-terminated.
Returns:
SQLDBC_OK on success SQLDBC_DATA_TRUNC if the output buffer was too small. SQLDBC_NOT_OK if a database access or conversion error occurred. In this case an error is set on this SQLDBC_UpdatableRowSet object.
See also:
bindColumn

SQLDBC_Int4 SQLDBC_UpdatableRowSet_getRowsAffected SQLDBC_UpdatableRowSet hdl  ) 
 

Returns the number of rows written to the bound parameters.

Parameters:
hdl [in] an SQLDBC_UpdatableRowSet handle.
Returns:
The number of rows fetched with the last fetch() call.
Note:
The number of fetched rows is updated by the next fetch() call. Positioning of the cursor within result set with SQLDBC_ResultSet::next(), SQLDBC_ResultSet::first(), ... does not change the number of rows.

SQLDBC_Int4* SQLDBC_UpdatableRowSet_getRowStatus SQLDBC_UpdatableRowSet hdl  ) 
 

Returns the row status array for the last fetch call.

The row status array describes the state of each row. The maximum size of the row status array is given by the setRowSetSize(). The row status array is filled during the fetch() call. The return code of the first row matches to the first member of the row status array.

Parameters:
hdl [in] an SQLDBC_UpdatableRowSet handle.
Returns:
A pointer to the first element of the row status array.
See also:
setRowSetSize(), getRowsAffected

SQLDBC_SQLWarning* SQLDBC_UpdatableRowSet_getWarning SQLDBC_UpdatableRowSet hdl  ) 
 

Returns a reference to an SQLWarning object stored in the SQLDBC_ConnectionItem object.

Note:
Getting the reference to the SQLWarning object will not clear the ErrorHndl object. All other function calls will empty the ErrorHndl object.
Parameters:
hdl [in] an SQLDBC_UpdatableRowSet handle.
Returns:
The SQLWarning object stored in the item.

SQLDBC_Retcode SQLDBC_UpdatableRowSet_insertAllRows SQLDBC_UpdatableRowSet hdl  ) 
 

Performs a mass insert of the whole row set into the result set.

Parameters:
hdl [in] an SQLDBC_UpdatableRowSet handle.
Returns:
SQLDBC_OK if the cursor is positioned on a row; SQLDBC_NO_DATA_FOUND otherwise; SQLDBC_NOT_OK if a database access error occurs or the result set type is FORWARD_ONLY.

SQLDBC_Retcode SQLDBC_UpdatableRowSet_insertOneRow SQLDBC_UpdatableRowSet hdl  ) 
 

Performs a single insert of the first row of the row set into the result set.

Parameters:
hdl [in] an SQLDBC_UpdatableRowSet handle.
Returns:
SQLDBC_OK if the row is inserted; SQLDBC_NOT_OK if a database access error occurs

SQLDBC_Retcode SQLDBC_UpdatableRowSet_insertRow SQLDBC_UpdatableRowSet hdl,
SQLDBC_UInt4  position
 

Performs a single insert of the first row of the row set into the result set.

Parameters:
hdl [in] an SQLDBC_UpdatableRowSet handle.
position Position in the row set. The data at this position is inserted as new row.
Returns:
SQLDBC_OK if the row is inserted; SQLDBC_NOT_OK if a database access error occurs

SQLDBC_Retcode SQLDBC_UpdatableRowSet_nextParameterByIndex SQLDBC_UpdatableRowSet hdl,
SQLDBC_Int2 paramIndex,
void **  paramAddr
 

Switches to the input parameter if the application uses data at execute parameters,.

After calling this member function, the paramIndex and the paramAddr parameters are set. The paramIndex parameter is used to select the next parameter that is processed. You cannot process parameters that are bound to LOB columns before all parameters that are bound to non-LOB columns have been processed for a row.

Parameters:
paramIndex Index of the next parameter that shall be processed, or 0 if the application has no preferred next parameter.
hdl [in] an SQLDBC_UpdatableRowSet handle.
paramAddr The data pointer that was supplied when binding the parameter, plus any offset that originates from a batch execution sequence (including row-wise binding).
Returns:
  • SQLDBC_NEED_DATA if paramIndex and paramAddr contain the index or address of the next parameter that will be delivered using putData().
  • SQLDBC_OK if the last parameter has been processed, and the statement was executed successfully.
  • SQLDBC_NOT_OK if there is an error (in this case, the error of the SQLDBC_PreparedStatement is set).
See also:
putData

SQLDBC_Retcode SQLDBC_UpdatableRowSet_putData SQLDBC_UpdatableRowSet hdl,
void *  paramAddr,
SQLDBC_Length paramLengthIndicator
 

Put data for an input parameter.

Parameters:
paramAddr Pointer to the data which is to be assigned to the SQL parameter. The type of the data must match the type assigned by the bindParameter() member function.
hdl [in] an SQLDBC_UpdatableRowSet handle.
paramLengthIndicator [in] Pointer to parameter length or indicator.
Returns:
See also:
nextParameter

SQLDBC_Retcode SQLDBC_UpdatableRowSet_setPos SQLDBC_UpdatableRowSet hdl,
SQLDBC_UInt4  pos
 

Sets the cursor to row pos in the SQLDBC_RowSet.

Parameters:
pos Row number within the row set. The first row of a row set is row number one.
hdl [in] an SQLDBC_UpdatableRowSet handle.
Returns:
SQLDBC_OK if the cursor is positioned on a row; SQLDBC_NO_DATA_FOUND otherwise; SQLDBC_NOT_OK if a database access error occurs or the result set type is FORWARD_ONLY.

SQLDBC_Retcode SQLDBC_UpdatableRowSet_updateRow SQLDBC_UpdatableRowSet hdl,
SQLDBC_UInt4  position
 

Updates a single row with the values of the first row of the row set at a given position.

Parameters:
hdl [in] an SQLDBC_UpdatableRowSet handle.
position Position in the row set which row has to be updated.
Returns:
SQLDBC_OK if the row is updated; SQLDBC_NOT_OK if a database access error occurs or the result set type is FORWARD_ONLY.