[plt-scheme] SrPersist and bind-parameter

From: Alex Peake (alex.peake at comac.com)
Date: Tue Feb 17 00:34:31 EST 2004

There are no examples, and the following returns 0 rows

(define table-select
  (string-append
    "SELECT rel, attr, domain, domlength, domprec, nullable, PKCOLSEQNUM AS pkpos, fkpos, fktable,
fkattr "
    " FROM Gen_Schema, syspkconstraints PK"
    " WHERE Gen_Schema.rel = PK.Name (+)"
    " AND Gen_Schema.attr = PK.ColName (+)"
    " AND rel = ?"))

(define tname-buffer (make-buffer '(sql-c-char 18)))
(define tname-indicator (make-indicator))
(write-buffer! tname-buffer "INVENTORY")
(prepare hstmt table-select)
(bind-parameter hstmt 1 'sql-param-input 'sql-varchar 18 tname-buffer tname-indicator)
(sql-execute hstmt)


and yet with:     " AND rel = 'INVENTORY'"))

I get lots.

What am I missing?

Alex



Posted on the users mailing list.