[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

title avoiding spurious response

unbewusst.sein

7/5/2008 9:24:00 AM

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 ?

--
Une Bévue
5 Answers

unbewusst.sein

7/5/2008 9:34:00 AM

0

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 ))
--
Une Bévue

Jeremy Hinegardner

7/5/2008 7:02:00 PM

0

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


unbewusst.sein

7/6/2008 5:57:00 AM

0

Jeremy Hinegardner <jeremy@hinegardner.org> wrote:

> 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.

id INTEGER PRIMARY KEY -> integer
type INTEGER -> integer
fk INTEGER -> integer | null
parent INTEGER -> integer
position INTEGER -> integer
title LONGVARCHAR -> text | null
keyword_id INTEGER -> integer | null
folder_type TEXT -> text | null
dateAdded INTEGER -> integer
lastModified INTEGER -> integer


I would suspect "LONGVARCHAR" ???
--
Une Bévue

Jeremy Hinegardner

7/6/2008 6:22:00 AM

0

On Sun, Jul 06, 2008 at 02:56:43PM +0900, Une B?vue wrote:
> Jeremy Hinegardner <jeremy@hinegardner.org> wrote:
>
> > 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.
>
> id INTEGER PRIMARY KEY -> integer
> type INTEGER -> integer
> fk INTEGER -> integer | null
> parent INTEGER -> integer
> position INTEGER -> integer
> title LONGVARCHAR -> text | null
> keyword_id INTEGER -> integer | null
> folder_type TEXT -> text | null
> dateAdded INTEGER -> integer
> lastModified INTEGER -> integer
>
>
> I would suspect "LONGVARCHAR" ???

Possibly, but I wouldn't be for sure. In the other thread it looks like you
have worked around it, so I guess that will work for you.

enjoy,

-jeremy

--
========================================================================
Jeremy Hinegardner jeremy@hinegardner.org


unbewusst.sein

7/6/2008 9:01:00 AM

0

Jeremy Hinegardner <jeremy@hinegardner.org> wrote:

>
> Possibly, but I wouldn't be for sure. In the other thread it looks like you
> have worked around it, so I guess that will work for you.

using amalgalite, yes no prob with spurious response.
but, afaik, amalgalite uses it's own sqlite3 embeded (thru
amalgamation).

then afterall, i suspected myself ;-)

i've re-installed sqlite3-ruby by gem :
~/gems%> sudo gem install --remote sqlite3-ruby --
--with-sqlite3-include=/opt/local/include
--with-sqlite3-lib=/opt/local/lib
Password:
Building native extensions. This could take a while...
Successfully installed sqlite3-ruby-1.2.2
1 gem installed
Installing ri documentation for sqlite3-ruby-1.2.2...
Installing RDoc documentation for sqlite3-ruby-1.2.2...
~/gems%>


no more spurious messages...

sorry for the noise !
--
Une Bévue