Odd Issue With DBD::SQLite3 - Inserts Don't Work

M

MaggotChild

On Windows XP using Ruby 1.9.1 the following fails to insert:

db = DBI.connect("dbi:SQLite3:#{ARGV.shift}")
s = db.prepare "insert into hits (hit_id, status_id, local_path,
remote_path, created_at) values (?, ?, ?, ?,?)"
s.execute "A123", 1, "A", "B", "2009-01-01"
s.finish
s = db.prepare "select * from hits"
s.execute
while row = s.fetch do
p row
end
s.finish
db.disconnect

using the SQLite3 library directly works? What could be causing this?
I'm using:

dbi 0.4.5
dbd-sqlite3 1.2.5
sqlite3-ruby 1.3.0

Thanks
 
M

MaggotChild

On Windows XP using Ruby 1.9.1 the following fails to insert:
s = db.prepare "select * from hits"
s.execute

This works if I insert rows through the sqlite3 client. But, no
inserts...
 

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

Similar Threads


Members online

Forum statistics

Threads
473,968
Messages
2,570,150
Members
46,697
Latest member
AugustNabo

Latest Threads

Top