ODBC transport doesn't work

Issue #15 resolved
John Yeung created an issue

There are a couple of small fixes needed to bring it up to minimal functionality:

  1. On the cursor execute (currently line 111 in iodbccall.py), ipc and clt are undefined. They need to be self.ipc and self.ctl, respectively. (Note the flipping of letters in the latter.)

  2. The "rows" being returned are true database rows (as you would expect from PEP 249) so they cannot be directly appended to the XML output string. You have to get the first (and only) element, which is a string, and strip off the nulls (currently line 116):

    xml_out += row[0].rstrip('\x00')

When I made those changes, the simple iCmd example (with RTVJOBA) worked.

Comments (3)

  1. Kevin Adler

    FYI, I improved the iDB2Call transport in bacc74170264043f13c4eca662e0bc6b075a1546 to support passing a PEP-249 compliant driver. Theoretically you could implement XMLSERVICE in any DBMS and it would work, thus the "iDB2Call" name is a misnomer and ideally would be fixed. Along with that change, I'd propose fixing #1 and just have a "DatabaseCall" or similar name. Leave modules with the old names that merely load and re-export the ones in the right location.

  2. Log in to comment