Bug in sqlite3 interface code

Q&A's, tips, howto's
Locked
nodrog_reversed
Posts: 2
Joined: Mon Apr 18, 2005 12:06 pm
Location: Ipswich, Queensland, Australia

Bug in sqlite3 interface code

Post by 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
Posts: 5289
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California
Contact:

Post by Lutz »

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

Lutz

Locked