next up previous contents index
Next: Introduction to XSB Packages Up: XSB-ODBC Interface Previous: Error messages   Contents   Index

Notes on specific ODBC drivers

MyODBC
The ODBC driver for MySQL is called MyODBC, and it presents some particularities that should be noted.

First, MySQL, as of version 3.23.55, does not support strings of length greater than 255 characters. XSB's ODBC interface has been updated to allow the use of the BLOB datatype to encode larger strings.

More importantly, MyODBC implements SQLDescribeCol such that, by default, it returns actual lengths of columns in the result table, instead of the formal lengths in the tables. For example, suppose you have, in table A, a field f declared as ``VARCHAR (200)''. Now, you create a query of the form ``SELECT f FROM A WHERE ...'' If, in the result set, the largest size of f is 52, that's the length that SQLDescribeCol will return. This breaks XSB's caching of query-related datastructures. In order to prevent this behavior, you should configure your DSN setup so that you pass ``Option=1'' to MyODBC.



Luis Fernando P. de Castro 2003-06-27