[plt-scheme] schemeql

From: Anton van Straaten (anton at appsolutions.com)
Date: Fri Mar 21 16:41:50 EST 2003

Upgrading to v203 didn't resolve my SchemeQL problem.  However, I've found a
workaround/solution.

I now have SchemeQL lying in a quivering heap on the floor in front of me,
begging for mercy.  (In case that image disturbs anyone, I'll spare you the
gorier details.)  Actually, it was pretty easy to debug (although I still
have some questions about how best to debug other people's modules).

The "Invalid string or buffer length" exception was being caused by the
following function in Schemeql's odbc.ss:

  (define is-column-unsigned?
    (lambda (hstmt index)
      (sister-interaction
       (if (>= (sister-ver) 3.0)
	   (sr:col-attribute hstmt index 'sql-desc-unsigned)
	   (sr:col-attributes hstmt index 'sql-column-unsigned))
       'unknown #f #f hstmt)))

On my system, (sister-ver) returns 3.51, so the call to 'sr:col-attribute',
i.e. col-attribute from SrPersist, was being executed.  This call was
generating the exception.  I haven't looked into SrPersist itself to see
what's happening at that level.

I tried inverting the condition so that sr:col-attributes is called
instead - and that appears to work.  I haven't done any extensive testing
yet, but I'm getting data back now, and I'm not getting any exceptions.

Of course, knowing nothing about the innards of ODBC, I don't really have
any idea what this means.  Please let me know if I need to report this
anywhere else.

Anton



Posted on the users mailing list.