I'm running tcl 8.6.8 on win7x64. I built the latest sqlite Tcl package
with the 3310100 source using mingw gcc under msys2.

Everything seems to work but I ran into a strange result with
last_insert_rowid().

The following example returns an ever-growing list of rowid's:

-----8x-----
package require sqlite3
console show

#file delete -force test.db
sqlite3 sql test.db
#sql eval {create table test (id integer primary key, number integer,
data blob)}
set a [clock seconds]
set b [expr {[clock seconds] % 100}]
set c [string repeat "\u3456" 25]
sql eval { insert into test (id, number, data) values( $a, $b, $c ) }
# The next statement returns a list... but shouldn't it only have one
element?
set oid [sql eval { select last_insert_rowid() from test }]
puts "\[[llength $oid]\] $oid"
-----8x-----

If the "file delete" and "create table" are uncommented, I only get a
single rowid the first time of course.

I am a complete sql novice so it's likely that it's a user error but I
thought I'd ask.

PS. I tried the rss feed in thunderbird but all I get is a date and a
link to all the author's posts. It would be nice if the message body was
included with each message.

_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to