From: Rahul Kumar Date: 2010-09-12T01:40:12+09:00 Subject: Re: sqlite3-ruby failing on 1.9.2 ? Eito Katagiri wrote: > Hi, > > On Sat, Sep 11, 2010 at 10:43 PM, Rahul Kumar > wrote: >> If I issue as simple statement such as: >> >> � db.execute(" insert into basic ( �id, desc ) values (?,?)",10, desc ) >> >> The first column gets a nil, which obviously fails if that col has a >> constraint. > > Try the statement below instead > > db.execute(" insert into basic ( �id, desc ) values (?,?)", [10, desc > ]) > >> (my 1.9.1 version is an earlier on 1.2.5) > > Some APIs have been changed since version 1.3.0. > According to API_CHANGES.rdoc, > > SQLite3::Database#execute only accepts an array for bind parameters. 1. The samples for execute used to give "*bind_params", but now they are working after i removed the "splat". (Is this compatible with earlier ruby versions ?) 2. bind_params() now has problems with Time and Date classes. I did a "to_s" to the values i am putting in the array, and they are working. I will only know later if the queries selecting data on time and date are working correctly. 3. I checked API_CHANGES.rdoc and Changelog.rdoc but i can't see the execute change, and any other changes that affect date and time. I would be grateful if someone could point out where these changes are. Has compatibility with earlier versions broken with these changes. thanks alot for the quick reply. -- Posted via http://www.ruby-forum.com/.