Getting DB2 Connectivity
Harold Lee <[email protected]> Sun, 26 Feb 2006 00:19:46 -0800
| Newsgroups | gmane.lisp.clsql.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi,
To begin with, let me say that I know DB2 is not supported. I'm
curious if the work on DB2 is ongoing, or stalled (maybe waiting for
a developer to help?).
I downloaded the free DB2 Express-C server and started playing with
it with CLSQL on my Linux box. I grabbed the latest versions of UFFI
and CLSQL this morning and am using CMUCL version 19a.
I found that I could connect if I change the code in db2-sql.lisp for
DB2-CONNECT to use nil instead of SQL_NULL_HANDLE (which slime says
evaluates to 0). The problem is that DB2 defines SQL_NULL_HANDLE as 0
in the C header file sqlcli.h but DB2 is expecting a NULL pointer as
the input handle to sql-alloc-handle. Since 0 and nil are different
in Lisp, maybe you want to change the definition of SQL_NULL_HANDLE
in db2-constants.lisp to be nil instead.
Here's the output from DB2 verifying that I got connected:
$ db2 list applications
Auth Id Application Appl. Application Id
DB # of
Name Handle
Name Agents
-------- -------------- ---------- ------------------------------
-------- -----
DB2INST lisp 102 *LOCAL.db2inst.060226064227
SAMPLE 1
From there it looks like most of the functionality is missing, such
as methods for the generic functions database-query and database-
execute-command. Also, there is a lot less code in the DB2
subdirectory than in the MySQL directory.
Should I provide more feedback as I make progress?
Harold Lee
[email protected]
_______________________________________________
CLSQL-Devel mailing list
[email protected]
http://lists.b9.com/mailman/listinfo/clsql-devel