Jeremy Hinegardner
7/5/2008 7:02:00 PM
On Sat, Jul 05, 2008 at 06:31:40PM +0900, Une B?vue wrote:
> Une B?vue <unbewusst.sein@weltanschauung.com.invalid> wrote:
>
> > for each db.execute row, i get a spurious respense like :
> > sql = SELECT DISTINCT * FROM moz_bookmarks WHERE title LIKE '%\U%';
> > block_given? = true
> > bind_vars.empty? = true
> > db = #<SQLite3::Database:0x4e5b9c>, db.type_translation() = false, stmt
> > = #<SQLite3::Statement:0x4db1c4>
> > check( 101 ) -> message:
> > /opt/local/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.1/lib/sqlite3/results
> > et.rb:69:in `commence'
> >
> > /opt/local/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.1/lib/sqlite3/results
> > et.rb:62:in `initialize'
> >
> > /opt/local/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.1/lib/sqlite3/stateme
> > nt.rb:164:in `new'
> >
> > /opt/local/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.1/lib/sqlite3/stateme
> > nt.rb:164:in `execute'
> >
> > /opt/local/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.1/lib/sqlite3/databas
> > e.rb:238:in `execute2'
> >
> > /opt/local/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.1/lib/sqlite3/databas
> > e.rb:189:in `prepare'
> >
> > /opt/local/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.1/lib/sqlite3/databas
> > e.rb:237:in `execute2'
> >
> > /Users/yt/work/Ruby/SQL/MySQL/bookmarks_from_sqlite/moz_bookmarks_update
> > _backslash_U.rb:16@eof = true, found = false, (@eof || found) = true
> >
> >
> > even if there is no error.
> >
> > how to avoid that ?
>
> sorry i forgot to mention the root subject ))
try this from the sqlite3 command line and see what you get:
select id, typeof( title ), typeof( guid ) from moz_bookmarks;
That will tell you the internal sqlite storage type of the field you are
requesting. I'm assuming the problem is with one of those fields, so try
typeof() on any field that you want to test out.
enjoy,
-jeremy
--
========================================================================
Jeremy Hinegardner jeremy@hinegardner.org