[plt-scheme] SrPersist and bind-parameter

From: Alex Peake (alex.peake at comac.com)
Date: Wed Feb 25 00:07:08 EST 2004

Many thanks to Jon Kre Hellan and Francisco Solsona for help on this.

For those that are interested the solution follows:

When I changed to:

(prepare hstmt table-select)
(define tname-buffer (make-buffer '(sql-c-char 18)))
(define tname-indicator (make-indicator))
(set-indicator! tname-indicator 'sql-nts) ;; <-- this was the key change
(bind-parameter hstmt 1 'sql-param-input 'sql-varchar 18 tname-buffer tname-indicator)
(write-buffer! tname-buffer "INVENTORY")
(read-buffer tname-buffer)
(read-indicator tname-indicator)
(sql-execute hstmt)


it all worked.

Alex
 


Posted on the users mailing list.