Bug in sqlite3 interface code

Started by nodrog_reversed, April 18, 2005, 05:11:39 AM

Previous topic - Next topic

nodrog_reversed

Hi,



I just started playing with newLisp and was trying the sqlite3 interface as supplied in the source code.



I found that there is a bug in the code - errors not being returned properly. So I'll submit it here. Sorry if this is the wrong part of the forum - or if this is well kown and already addressed.



The new code is:



(define (set-error)

   (set 'result (sqlite3_errmsg db))

   (if (= result 0)

      (set 'error-message "")

      (set 'error-message (get-string result))))



Fix is in last line - in the source it did (get-string error-message) but should be (get-string result).



Cheers,

Gordon.

Lutz

#1
Welcome to the group Gordon, and  thanks for the correction, this will be changed in the next development release.



Lutz