Page
Library
Module
Module type
Parameter
Class
Class type
Source
Freetds.DblibSourceLow level binding to the DB-lib part of freetds. These bindings mimic the C API and therefore some functions must be used in the right order. Look at the FreeTDS User Guide and Sybase documentation for fine points. Use OCamlDBI with the freetds driver for an easier interaction with such databases.
Value that contains all information needed by Freetds.Dblib to manage communications with the server.
val connect :
?user:string ->
?password:string ->
?charset:string ->
?language:string ->
?application:string ->
string ->
dbprocessconnect server: open a connection to the given database server.
Send the SQL command to the server and wait for an answer.
Warning: There is one absolutely crucial, inflexible, unalterable requirement: the application must process all rows produced by the query. Before the dbprocess can be used for another query, the application must either fetch all rows, or cancel the results and receive an acknowledgement from the server.
Cancel the query currently being retrieved, (retriving and) discarding all pending rows.
results conn returns true if some results are available and false if the query produced no results. There may be several results if COMPUTE clauses are used. One MUST CALL this function before trying to retrieve any rows.
colname conn c returns the name of a regular result column c. The first column has number 1.
type data = | NULL| STRING of string| TINY of int| SMALL of int| INT of int| INT32 of int32| INT64 of string| FLOAT of float| DATETIME of int * int * int * int * int * int * int * int(year, month, day, hour, minute, second, millisecond, zone)
*)| MONEY of float| BIT of bool| BINARY of string| NUMERIC of string| DECIMAL of stringGet count of rows processed.
Error(severity, err, message) is raised on dblib errors. You can change the reaction to some errors by installing your own handler with err_handler.
err_handler f installs f as the default error handler for non-OS related errors and errors not coming from the server. f is given the severity, the number of the error (see the 400 or so error numbers sybdb.h, macros SYBE...) and the message.
msg_handler f installs f as the default message handler for messages coming from the server. f is given the severity, the line number, and the message.
settime seconds Set the number of seconds that DB-Library will wait for a server response to a SQL command. If not response is obtained within that period, raise Error(TIME, _).