simple SQLITE3 error!!??library routine called out of sequence

T

Tianshuo Deng

=20
Hi, dear guys!
I have following super simple program
dbh=3DDBI.connect("DBI:SQLite3:barron.db")
sth=3Ddbh.prepare("INSERT INTO WORDS VALUES(?,?,?)")
=20
3.times{
sth.execute("1","2","3")
}
=20
and it gives me error :
=
/Users/tsdeng/.rvm/gems/ruby-1.8.7-p302/gems/sqlite3-ruby-1.3.1/lib/sqlite=
3/statement.rb:41:in `bind_param': library routine called out of =
sequence (SQLite3::MisuseException)
/Users/tsdeng/.rvm/gems/ruby-1.8.7-p302/gems/sqlite3-ruby-1.3.1/lib/sqlite=
3/statement.rb:41:in `bind_params'
/Users/tsdeng/.rvm/gems/ruby-1.8.7-p302/gems/sqlite3-ruby-1.3.1/lib/sqlite=
3/statement.rb:37:in `each'
/Users/tsdeng/.rvm/gems/ruby-1.8.7-p302/gems/sqlite3-ruby-1.3.1/lib/sqlite=
3/statement.rb:37:in `bind_params'
/Users/tsdeng/.rvm/gems/ruby-1.8.7-p302/gems/dbd-sqlite3-1.2.5/lib/dbd/sql=
ite3/statement.rb:71:in `bind_params'
/Users/tsdeng/.rvm/gems/ruby-1.8.7-p302/gems/dbi-0.4.5/lib/dbi/handles/sta=
tement.rb:115:in `execute'
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top