[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: SchemeQL problem

"Chris Double" <chris@double.co.nz> writes:


> Any ideas where the problem could lie? I can use the 'db' database from
> other ODBC programs.

What ODBC driver are you using?  is there any driver manager in the
middle? If so, the problem might be that your actual driver is less
than 3.0, and your driver manager is 3.51, etc.  Thus you compiled
SrPersist having:


or similar.  SchemeQL relies on the information returned by:

(compiled-odbc-version) ;; 3.50 if ODBCVER is like above

and so it tries to call `alloc-handle' to alloc environment,
connection, and statement handles.  The error:

=> Unspecified error in alloc-handle

means, most of the time I guess, that alloc-handle is not supported by
your actual driver.  Then you should be using a 2.0, or similar ODBC
compliant notation: alloc-henv, alloc-connect, etc.

Could you please try this:

(require (lib "schemeql.ss" "schemeql"))
(sister-ver 2.5) ;; (sister-ver) must return 3.51, I guess.
(define sql (connect-to-database "db" "user" "password"))

This is a known problem, unfortunately one without a known solution.
:-( I guess that it isn't enough to tell SchemeQL to use a smaller
sister-ver, but you have to re-compile your SrPersist to use that
version too.  Ummmm yes, that should do it (Paul, what do you think?).


P.S. I recently downloaded the: `spgsql - Interface library for
PostgreSQL', and I believe it would be fairly easy to add support to
SchemeQL to use it as a back-end too.  I'll give it a go ASAP (in a
couple of weeks I guess).  This should help alleviate the ODBC
problems for PostgreSQL users only, though.