Hi all, Here is the first proposal for a database independent interface (Dbi) for Ocaml. The file "dbi.mli" is attached below. The code and some experiments with Mysql can be downloaded from http://www.umh.ac.be/math/an/software.php#x4-60005 Some sample code: module DB = Dbi_mysql (* select db module *) let t = new DB.row_conversion let ( ++ ) = Dbi.(^^) let dbh = DB.connect ~host ~pwd "my database" in let q = dbh#prepare "SELECT Salary, Name from employees" in let res = dbh#raw_exec q [||] in let s = res#fold (t#int ++ t#string) (fun sum s _ -> sum + s) 0 in dbh#disconnect; s This release is to foster discussions, it is not to be considered as clean/ready-to-use code. In particular, some points I'd like feedback on: * I think the scheme for "parameter binding" (for encoding and decoding) is quite convenient (and prevents the often forgotten escaping for encoding). Does it also fit the needs of your applications? * The way "parameter binding" is implemented (a la scanf) has some performance penalty. Is it possible to come up with a better implementation or better ideas? Is it possible to use Camlp4 to reduce the cost while providing the same convenience? * Are you happy with the methods provided by Dbi.result and the interaction between "step by step" and "iteration/folding" schemes (stateful object)? * What basic SQL conversion functions should be provided by all DBs (class type Dbi.conversion)? * What exceptions should be defined in order not to have too many of them yet to offer flexibility? The exceptions defined so far are a bit basic, they need to be refined. I am available for questions if things are unclear (but don't hold your breath, I am pretty busy). Cheers, ChriS