INDEX CLUSTER FEATURES SHORT FRAMES NO FRAMES

indexing

title: "Declaration of the ODBC API"
project: "Visual Eiffel"
revision: "$Revision: 1.1 $"
copyright: "Copyright (C) 1996-2005 Object Tools Group"
license: "http://visual-eiffel.com/license"
cluster: dale
class ODBC_API
inherit

ODBCFUN
end

DALE_SERVER
end
feature -- Global:

retcode: INTEGER
feature -- Attributes:

f_name: STRING

f_name_len: INTEGER

f_sqltype: INTEGER

f_prec: INTEGER

f_scale: INTEGER

f_length: INTEGER

f_required: INTEGER
feature -- Settings

set_retcode (r: INTEGER)

conv_retcode (r: INTEGER)
-- ...

int_to_shortint (r: INTEGER): INTEGER
feature -- Commands:

sql_alloc_env (phenv: POINTER)
-- This method allocates memory for an environment handle and
-- initializes the ODBC call level interface for use by an
-- application.

sql_alloc_connect (henv: INTEGER; phdbc: POINTER)
-- This method allocates memory for a connection handle within the
-- environment identified by henv.

sql_alloc_stmt (hdbc: INTEGER; phstmt: POINTER)
-- This method allocates memory for a statement handle and
-- associates the statement handle with the connection specified
-- by hdbc.

sql_bind_col (hstmt, irow, ctype: INTEGER; buf: POINTER; buflen: INTEGER; preslen: POINTER)
-- This method assigns the storage and data type for a column in a
-- result set.

sql_bind_parameter (hstmt, ipar, partype, ctype, sqltype, prec, scale: INTEGER; buf: POINTER; bufmax: INTEGER; pbuflen: POINTER)
-- This method binds a buffer to a parameter marker in an SQL
-- statement.

sql_browse_connect (hdbc: INTEGER; pcsin: POINTER; csinlen: INTEGER; pcsout: POINTER; csoutmax: INTEGER; pcsoutlen: POINTER)
-- This method supports an iterative method of discovering and
-- enumerating the attributes and attribute values required to
-- connect to a data source. Each call to SQLBrowseConnect returns
-- successive levels of attributes and attribute values. When all
-- levels have been enumerated, a connection to the data source is
-- completed and a complete connection string is produced.

sql_cancel (hstmt: INTEGER)
-- This method cancels the processing on an hstmt.

sql_col_attributes (hstmt, icol, desctype: INTEGER; pdesc: POINTER; descmax: INTEGER; pdesclen: POINTER; pdescinfo: POINTER)
-- This method returns descriptor information for a column in a
-- result set.

sql_column_privileges (hstmt: INTEGER; ptabqual: POINTER; tabquallen: INTEGER; ptabowner: POINTER; tabownerlen: INTEGER; ptabname: POINTER; tabnamelen: INTEGER; pcolname: POINTER; colnamelen: INTEGER)
-- This method returns a list of columns and associated privileges
-- for the specified table. The driver returns the information as a
-- result set on the specified hstmt.

sql_columns (hstmt: INTEGER; ptabqual: POINTER; tabquallen: INTEGER; ptabowner: POINTER; tabownerlen: INTEGER; ptabname: POINTER; tabnamelen: INTEGER; pcolname: POINTER; colnamelen: INTEGER)
-- This method returns the list of column names in specified tables.
-- The driver returns this information as a result set on the
-- specified hstmt.

sql_connect (hdbc: INTEGER; pdsn: POINTER; dsnlen: INTEGER; puser: POINTER; userlen: INTEGER; ppass: POINTER; passlen: INTEGER)
-- This method loads a driver and establishes a connection to a data
-- source. The connection handle references storage of all
-- information about the connection, including status, transaction
-- state, and error information.

sql_data_sources (henv: INTEGER; dir: INTEGER; pdsn: POINTER; dsnmax: INTEGER; pdsnlen: POINTER; pdesc: POINTER; descmax: INTEGER; pdesclen: POINTER)
-- This method lists data source names.

sql_describe_column (hstmt: INTEGER; icol: INTEGER; pcolname: POINTER; pcolnamemax: INTEGER; colnamelen, psqltype, pprec, pscale, pnullable: POINTER)
-- This method returns the result descriptor - column name, type,
-- precision, scale, and nullability - for one column in the result
-- set.

describe_column (h, i, fnsize: INTEGER)
-- This method returns the result descriptor - column name, type,
-- precision, scale, and nullability - for one column in the result
-- set.
require
valid_field_name_size: fnsize > 0

sql_describe_param (hstmt, ipar: INTEGER; psqltype, pprec, pscale, pnullable: POINTER)
-- This method returns the description of a parameter marker
-- associated with a prepared SQL statement.

sql_disconnect (hdbc: INTEGER)
-- This method closes the connection associated with a specific
-- connection handle

sql_driver_connect (hdbc, hwnd: INTEGER; pcsin: POINTER; csinlen: INTEGER; pcsout: POINTER; csoutmax: INTEGER; pcsoutlen: POINTER; drvcomplflag: INTEGER)
-- This method is an alternative to 'sql_connect'. It supports data
-- sources that require more connection information than the three
-- arguments in 'sql_connect', dialog boxes to prompt the user for
-- all connection information, and data sources that are not defined
-- in the ODBC.INI file or registry.

sql_drivers (henv, dir: INTEGER; pdrvdesc: POINTER; drvdescmax: INTEGER; pdrvdesclen: POINTER; pdrvattrs: POINTER; drvattrmax: INTEGER; pdrvrattrlen: POINTER)
-- This method lists driver descriptions and driver attribute
-- keywords. This function is implemented solely by the Driver
-- Manager.

sql_error (henv, hdbc, hstmt: INTEGER; psqlstate, pnative, perrmsg: POINTER; errmsgmax: INTEGER; perrmsglen: POINTER)
-- Returns RETCODE.

sql_exec_direct (hstmt: INTEGER; psqlstr: POINTER; count: INTEGER)
-- This method executes a preparable statement, using the current
-- values of the parameter marker variables if any parameters exist
-- in the statement.

sql_execute (hstmt: INTEGER)
-- This method executes a prepared statement, using the current
-- values of the parameter marker variables if any parameter markers
-- exist in the statement.

sql_extended_fetch (hstmt: INTEGER; fetchtype, irow: INTEGER; prowcount, prowstatus: POINTER)
-- This method extends the functionality of SQLFetch in the
-- following ways:
-- 1. It returns rowset data (one or more rows), in the form of an
-- array, for each bound column.
-- 2. It scrolls through the result set according to the setting of
-- a scroll-type argument.

sql_fetch (hstmt: INTEGER)
-- This method fetches a row of data from a result set.

sql_foreign_keys (hstmt: INTEGER; ppktabqual: POINTER; pktabquallen: INTEGER; ppktabowner: POINTER; pktabownerlen: INTEGER; ppktabname: POINTER; pktabnamelen: POINTER; pfktabqual: POINTER; fktabquallen: INTEGER; pfktabowner: POINTER; fktabownerlen: INTEGER; pfktabname: POINTER; fktabnamelen: POINTER)
-- This method can return:
-- 1. A list of foreign keys in the specified table (columns in the
-- specified table that refer to primary keys in other tables).
-- 2. A list of foreign keys in other tables that refer to the
-- primary key in the specified table.

sql_free_connect (hdbc: INTEGER)
-- This method releases a connection handle and frees all memory
-- associated with the handle.

sql_free_env (henv: INTEGER)
-- This method frees the environment handle and releases all memory
-- associated with the environment handle.

sql_free_stmt (hstmt, opt: INTEGER)
-- This method stops processing associated with a specific hstmt,
-- closes any open cursors associated with the hstmt, discards
-- pending results, and, optionally, frees all resources associated
-- with the statement handle.

sql_get_connect_option (hdbc, optcode: INTEGER; pv: POINTER)
-- This method returns the current setting of a connection option.

sql_get_cursor_name (hstmt: INTEGER; pcurname: POINTER; curmax: INTEGER; pcurlen: POINTER)
-- This method returns the cursor name associated with a specified
-- hstmt.

sql_get_data (hstmt, icol: INTEGER; pvalue: POINTER; valmax: INTEGER; pvallen: POINTER)
-- This method returns result data for a single unbound column in
-- the current row.

sql_get_functions (hdbc, funcode: INTEGER; pexists: POINTER)
-- This method returns information about whether a driver supports
-- a specific ODBC function. This function is implemented in the
-- Driver Manager; it can also be implemented in drivers.

sql_get_info (hdbc, infotype: INTEGER; pinfo: POINTER; infomax: INTEGER; pinfolen: POINTER)
-- This method returns general information about the driver and data
-- source associated with an hdbc.

sql_get_stmt_option (hstmt, optcode: INTEGER; pv: POINTER)
-- This method returns the current setting of a statement option.

sql_get_type_info (hstmt, sqltype: INTEGER)
-- This method returns information about data types supported by the
-- data source. The driver returns the information in the form of an
-- SQL result set.

sql_more_results (hstmt: INTEGER)
-- This method determines whether there are more results available
-- on an hstmt containing SELECT, UPDATE, INSERT, or DELETE statements
-- and, if so, initializes processing for those results.

sql_native_sql (hdbc: INTEGER; psin: POINTER; sinlen: INTEGER; psout: POINTER; soutmax: INTEGER; psoutlen: POINTER)
-- This method returns the SQL string as translated by the driver.

sql_num_params (hstmt: INTEGER): INTEGER
-- This method returns the number of parameters in an SQL statement.

sql_num_result_cols (hstmt: INTEGER): INTEGER
-- This method returns the number of columns in a result set.

sql_param_data (hstmt: INTEGER): INTEGER
-- This method is used in conjunction with 'sql_put_data' to supply
-- parameter data at statement execution time.

sql_param_options (hstmt, crow: INTEGER; pirow: POINTER)
-- This method allows an application to specify multiple values for
-- the set of parameters assigned by 'sql_bind_parameter'.

sql_prepare (hstmt: INTEGER; psqlstr: POINTER; sqlstrlen: INTEGER)
-- This method prepares a SQL string for execution.

sql_primary_keys (hstmt: INTEGER; ptabqual: POINTER; tabquallen: INTEGER; ptabowner: POINTER; tabownerlen: INTEGER; ptabname: POINTER; tabnamelen: INTEGER)
-- This method returns the column names that comprise the primary
-- key for a table. The driver returns the information as a result
-- set. This function does not support returning primary keys from
-- multiple tables in a single call.

sql_procedure_columns (hstmt: INTEGER; pprocqual: POINTER; procquallen: INTEGER; pprocowner: POINTER; procownerlen: INTEGER; pprocname: POINTER; procnamelen: INTEGER; pcolname: POINTER; colnamelen: INTEGER)
-- This method returns the list of input and output
-- parameters, as well as the columns that make up the result set
-- for the specified procedures. The driver returns the information
-- as a result set on the specified hstmt.

sql_procedures (hstmt: INTEGER; pprocqual: POINTER; procquallen: INTEGER; pprocowner: POINTER; procownerlen: INTEGER; pprocname: POINTER; procnamelen: INTEGER)
-- This method returns the list of procedure names stored in a
-- specific data source.

sql_put_data (hstmt: INTEGER; pvalue: POINTER; valuelen: INTEGER)
-- This method allows an application to send data for a parameter or
-- column to the driver at statement execution time.

sql_row_count (hstmt: INTEGER): INTEGER
-- This method returns the number of rows affected by an UPDATE,
-- INSERT, or DELETE statement or by a SQL_UPDATE, SQL_ADD, or
-- SQL_DELETE operation in SQLSetPos.

sql_set_connect_option (hdbc, optcode, pv: INTEGER)
-- This method sets options that govern aspects of connections.

sql_set_cursor_name (hstmt: INTEGER; pcname: POINTER; cnamelen: INTEGER)
-- This method associates a cursor name with an active hstmt. If an
-- application does not call SQLSetCursorName, the driver generates
-- cursor names as needed for SQL statement processing.

sql_set_pos (hstmt, irow, optcode, lock: INTEGER)
-- This method sets the cursor position in a rowset and allows an
-- application to refresh, update, delete, or add data to the rowset.

sql_set_scroll_options (hstmt, concur, crowkeyset, crowrowset: INTEGER)
-- This method sets options that control the behavior of cursors
-- associated with an hstmt, and allows the application to specify
-- the type of cursor behavior desired in three areas: concurrency
-- control, sensitivity to changes made by other transactions, and
-- rowset size.

sql_set_stmt_option (hstmt, optcode, pv: INTEGER)
-- This method sets options related to an hstmt.

sql_special_columns (hstmt, coltype: INTEGER; ptabqual: POINTER; tabquallen: INTEGER; ptabowner: POINTER; tabownerlen: INTEGER; ptabname: POINTER; tabnamelen, scope, nullable: INTEGER)
-- This method retrieves the following information about columns
-- within a specified table:
-- 1. The optimal set of columns that uniquely identifies a row in
-- the table.
-- 2. Columns that are automatically updated when any value in the
-- row is updated by a transaction.

sql_statistics (hstmt: INTEGER; ptabqual: POINTER; tabquallen: INTEGER; ptabowner: POINTER; tabownerlen: INTEGER; ptabname: POINTER; tabnamelen, uniq, accuracy: INTEGER)
-- This method retrieves a list of statistics about a single table
-- and the indexes associated with the table. The driver returns the
-- information as a result set.

sql_table_privileges (hstmt: INTEGER; ptabqual: POINTER; tabquallen: INTEGER; ptabowner: POINTER; tabownerlen: INTEGER; ptabname: POINTER; tabnamelen: INTEGER)
-- This method returns a list of tables and the privileges associated
-- with each table. The driver returns the information as a result
-- set on the specified hstmt.

sql_tables (hstmt: INTEGER; ptabqual: POINTER; tabquallen: INTEGER; ptabowner: POINTER; tabownerlen: INTEGER; ptabname: POINTER; tabnamelen: INTEGER; ptabtype: POINTER; tabtypelen: INTEGER)
-- This method returns the list of table names stored in a specific
-- data source. The driver returns the information as a result set.

sql_transact (henv, hdbc, type: INTEGER)
-- This method requests a commit or rollback operation for all
-- active operations on all hstmts associated with a connection.
-- Method can also request that a commit or rollback operation
-- be performed for all connections associated with the henv.
end -- class ODBC_API

INDEX CLUSTER FEATURES SHORT FRAMES NO FRAMES