diff -u -N -r ../orig/MonetDB-4.14.0/src/mapi/clients/python/Cimpl/MapiLib.py.c MonetDB-4.14.0/src/mapi/clients/python/Cimpl/MapiLib.py.c
--- ../orig/MonetDB-4.14.0/src/mapi/clients/python/Cimpl/MapiLib.py.c	2006-12-04 15:32:05.000000000 -0800
+++ MonetDB-4.14.0/src/mapi/clients/python/Cimpl/MapiLib.py.c	2006-12-05 10:30:10.972571848 -0800
@@ -3516,6 +3516,22 @@
         SWIG_arg_fail(2);SWIG_fail;
     }
     result = (MapiHdl)mapi_query(arg1,(char const *)arg2);
+
+    /* Crude hack alert: print MAPI errors to stderr because MonetSQLdb
+     * wrappers raise ``RuntimeError(None)`` instead of something useful.
+     */
+    if (result == NULL) {
+	mapi_explain(arg1, stderr);
+    } else if (mapi_result_error(result)) {
+	mapi_explain_result(result, stderr);
+        mapi_close_handle(result);
+        result = NULL;
+    } else if (mapi_error(arg1)) {
+	mapi_explain_query(arg1, stderr);
+	mapi_close_handle(result);
+	result = NULL;
+   }
+
     
     resultobj = SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_MapiStatement, 0);
     return resultobj;
diff -u -N -r ../orig/MonetDB-4.14.0/src/mapi/clients/python/Cimpl/MonetSQLdb/converters.py MonetDB-4.14.0/src/mapi/clients/python/Cimpl/MonetSQLdb/converters.py
--- ../orig/MonetDB-4.14.0/src/mapi/clients/python/Cimpl/MonetSQLdb/converters.py	2006-11-07 15:45:02.000000000 -0800
+++ MonetDB-4.14.0/src/mapi/clients/python/Cimpl/MonetSQLdb/converters.py	2006-12-05 10:24:45.728016536 -0800
@@ -42,8 +42,10 @@
 """
 
 from string import split, replace, join
+import datetime
 import times
 import types
+import monetbinary
 
 def string_literal(s, d):
     s = replace(s, "\\", "\\\\")
@@ -123,9 +125,34 @@
     x = x[x.find(":")+2:-1]
     return join(map(lambda x: chr(int(x, 16)), x.split(" ")), '')
 
+def binary2blob(x, d):
+    return x.encode()
+
+def Bool2Str(x, d):
+    if x:
+        return 'true'
+    return 'false'
+
+def datetime2str(x, d):
+    return string_literal(str(x))
+
+def str2time(x):
+    return datetime.time(*[int(float(x)) for x in value.split('-'))
+
+def str2date(x):
+    return datetime.date(*[int(float(x)) for x in value.split('-'))
+
+def str2datetime(x):
+    date, time = x.split()
+    return datetime.datetime(
+            *([ int(float(x)) for x in date.split('-')] +
+            [ int(float(x)) for x in time.split(':')]))
+
+
 
 conversions = {
     # Python -> Monet
+    types.BooleanType: Bool2Str,
     types.IntType: Thing2Str,
     types.LongType: Long2Int,
     types.FloatType: Thing2Str,
@@ -137,6 +164,10 @@
     # array.ArrayType: array2Str,
     # FIXME: date/time types
     types.StringType: Thing2Literal, # default
+    type(monetbinary.Binary): binary2blob,
+    datetime.date: datetime2str,
+    datetime.time: datetime2str,
+    datetime.datetime: datetime2str,
 
     # Monet SQL -> Python
     "varchar": str,
@@ -148,9 +179,9 @@
     "double": float,
     "blob": str2blob,
     # timestamp types
-    "date": times.fromDate,
-    "time": times.fromTime,
-    "timestamp": times.fromTimestamp,
+    "date": str2date,
+    "time": str2time,
+    "timestamp": str2datetime,
 
     # Monet MIL -> Python
     "str": str,
@@ -183,6 +214,8 @@
         for a in x:
             if conv.has_key(type(a)):
                 y.append(conv[type(a)](a, conv))
+            else:
+                raise ValueError, "No conversion for %r"%(a,)
         if type(x) is types.TupleType:
             y = tuple(y)
         return y
@@ -190,11 +223,15 @@
         for a in x:
             if conv.has_key(type(x[a])):
                 x[a] = conv[type(x[a])](x[a], conv)
+            else:
+                raise ValueError, "No conversion for %r"%(a,)
         return x
 
     # single value
     if conv.has_key(type(x)):
         x = conv[type(x)](x, conv)
+    else:
+        raise ValueError, "No conversion for %r"%(x,)
     return x
 
 
diff -u -N -r ../orig/MonetDB-4.14.0/src/mapi/clients/python/Cimpl/MonetSQLdb/__init__.py MonetDB-4.14.0/src/mapi/clients/python/Cimpl/MonetSQLdb/__init__.py
--- ../orig/MonetDB-4.14.0/src/mapi/clients/python/Cimpl/MonetSQLdb/__init__.py	2006-06-12 08:57:17.000000000 -0700
+++ MonetDB-4.14.0/src/mapi/clients/python/Cimpl/MonetSQLdb/__init__.py	2006-12-05 10:26:28.764352632 -0800
@@ -45,6 +45,7 @@
 from CMapi import *
 from monetexceptions import *
 import cursors, converters
+from monetbinary import *
 
 def Connect(**kwargs):
     """Factory function for connections.Connection."""
@@ -119,10 +120,14 @@
         	self._mapi = Mapi(kwargs['host'], kwargs['port'], kwargs['user'], kwargs['password'], kwargs['lang'])
 	else:
         	self._mapi = Embedded(kwargs['dbfarm'], kwargs['dbname'], kwargs['lang'])
+        self.setAutocommit(0)
 
     def close(self):
         del self._mapi
 
+    def setAutocommit(self, autocommit=True):
+        self._mapi.setAutocommit(autocommit)
+
     def commit(self):
         """Commit the current transaction."""
         if self.lang == 'mil':
@@ -161,14 +166,15 @@
 
     errorhandler = defaulterrorhandler
 
+class Binary:
+    def __init__(self, value):
+        self._value = value
+
+    def encode(self):
+        bytes = ''.join(['%02x'%(ord(x),) for x in self._value)
+        return "BLOB '%s'"%(bytes,)
+
+    __str__ = encode
 
-__all__ = [ 'BINARY', 'Binary', 'Connect', 'Connection', 'DATE',
-    'Date', 'Time', 'Timestamp', 'DateFromTicks', 'TimeFromTicks',
-    'TimestampFromTicks', 'DataError', 'DatabaseError', 'Error',
-    'FIELD_TYPE', 'IntegrityError', 'InterfaceError', 'InternalError',
-    'MySQLError', 'NULL', 'NUMBER', 'NotSupportedError', 'DBAPISet',
-    'OperationalError', 'ProgrammingError', 'ROWID', 'STRING', 'TIME',
-    'TIMESTAMP', 'Set', 'Warning', 'apilevel', 'connect', 'connections',
-    'constants', 'cursors', 'debug', 'escape', 'escape_dict',
-    'escape_sequence', 'escape_string', 'get_client_info',
-    'paramstyle', 'string_literal', 'threadsafety', 'version_info']
+    def as_python(self):
+        return self._value
diff -u -N -r ../orig/MonetDB-4.14.0/src/mapi/clients/python/Cimpl/MonetSQLdb/monetbinary.py MonetDB-4.14.0/src/mapi/clients/python/Cimpl/MonetSQLdb/monetbinary.py
--- ../orig/MonetDB-4.14.0/src/mapi/clients/python/Cimpl/MonetSQLdb/monetbinary.py	1969-12-31 16:00:00.000000000 -0800
+++ MonetDB-4.14.0/src/mapi/clients/python/Cimpl/MonetSQLdb/monetbinary.py	2006-12-05 10:17:06.187877256 -0800
@@ -0,0 +1,16 @@
+"""
+A simple DB-API binary type.
+"""
+
+class Binary (object):
+    def __init__(self, value):
+        self._value = value
+
+    def encode(self):
+        bytes = ''.join(['%02x'%(ord(x),) for x in self._value)
+        return "BLOB '%s'"%(bytes,)
+
+    __str__ = encode
+
+    def as_python(self):
+        return self._value
