print securities.filter(:ACCOUNT => '333').sql
outputs:
SELECT * FROM "CAMDATA" WHERE ("ACCOUNT" = '333')
But
securities.filter(:ACCOUNT => '333').each{|x| p x}
outputs:
c:/ruby/lib/ruby/gems/1.8/gems/sequel-3.4.0/lib/sequel/adapters/ado.rb:
46:in `method_missing': WIN32OLERuntimeError: Execute
(Sequel::DatabaseError)
OLE error code:80040E14 in Microsoft JET Database Engine
Syntax error in query. Incomplete query clause.
HRESULT error code:0x80020009
Exception occurred.
from c:/ruby/lib/ruby/gems/1.8/gems/sequel-3.4.0/lib/sequel/adapters/
ado.rb:46:in `execute'
from c:/ruby/lib/ruby/gems/1.8/gems/sequel-3.4.0/lib/sequel/
connection_pool.rb:112:in `hold'
from c:/ruby/lib/ruby/gems/1.8/gems/sequel-3.4.0/lib/sequel/
database.rb:481:in `synchronize'
from c:/ruby/lib/ruby/gems/1.8/gems/sequel-3.4.0/lib/sequel/adapters/
ado.rb:44:in `execute'
from c:/ruby/lib/ruby/gems/1.8/gems/sequel-3.4.0/lib/sequel/
dataset.rb:333:in `execute'
from c:/ruby/lib/ruby/gems/1.8/gems/sequel-3.4.0/lib/sequel/adapters/
ado.rb:82:in `fetch_rows'
from c:/ruby/lib/ruby/gems/1.8/gems/sequel-3.4.0/lib/sequel/
dataset.rb:189:in `each'
from test_sequel_connstring.rb:6
> The ADO adapter defaults to assuming SQL Server syntax, so you need to
> override it:
>
> DB=Sequel.ado(:conn_string=>'Provider=Microsoft.Jet.OLEDB.4.0;Data
> Source=C:\mydata\my_file.xls;Extended Properties=Excel
> 8.0;', :driver=>'')
>
> Jeremy- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sequel-talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sequel-talk?hl=en
-~----------~----~----~----~------~----~------~--~---