(odbc) - ODBC binding

Library (odbc)

This library provides ODBC access procedures.

ODBC is a common database access interface so that it doesn't depend on specific APIs. This library is for implementing ODBC DBD for DBI, using this library directly is not recommended.

NOTE: the library is supported only your platform is supporting ODBC.

Function create-odbc-env

Creates and returns ODBC environment object.

Function odbc-env? obj

Returns #t if the given obj is ODBC environment object.

Function free-handle odbc-ctx

Releases given ODBC resource.

Function connect! ocbc-env server username password :optional (auto-commit #t)

odbc-env must be an ODBC environment object created by create-odbc-env.

server must be a string indicating ODBC database name.

username and password must be string.

Connects to server with authentication of username and password and returns ODBC database connection object. If optional argument auto-commit is #f then the connection won't commit transaction automatically.

Function odbc-connection? obj

Returns #t if the given obj is ODBC connection object.

Function disconnect! odbc-dbc

Disconnect from the database.

Function connection-open? odbc-dbc

Returns #t if the given ODBC connection is available, otherwise #f.

Function prepare odbc-dbc sql

Creates and returns a ODBC statement object.

Function odbc-statement? obj

Returns #t if the given obj is ODBC statement object.

Function statement-open? odbc-stmt

Returns #t if the given ODBC statement is available, otherwise #f.

Function num-prams odbc-stmt

Returns number of parameters in an SQL statement.

Function bind-parameter! odbc-stmt index value

Binds the given value at position index.

Function execute! odbc-stmt

Execute given ODBC statement.

Function fetch! odbc-stmt

Forwarding current cursor to next and returns #t if there is data otherwise #f.

Function get-data! odbc-stmt index

Retrieve data from statement at position index.

Function row-count odbc-stmt

Returns the number of rows affected by UPDATE, INSERT or DELETE statement.

Function column-count odbc-stmt

Returns the number of columns in a result statement.

Function result-columns odbc-stmt

Returns the column names in a result statement.

Function commit! odbc-ctx
Function rollback! odbc-ctx

Commits/rollbacks given ODBC context.

(dbd odbc) - DBD for ODBC

Library (dbd odbc)

This library provides database driver (DBD) for ODBC .

Importing this library is done by DBI automatically so users should not use this directly.

The DSN should specify the connecting database name with server keyword. Following DSN is connecting foo database configured in ODBC.

"dbi:odbc:server=_foo_"The dbi-connect supports :username, :password and :auto-commit keyword arguments. The detail about DBI see (dbi) - Database independent access layer.