don''t know if this will help you but I have had luck using it on
linux/unixODBC to connect to an AS400 system.
http://rubyforge.org/projects/odbc-rails/
On 1/16/07, Ed <edward.syrett-4KaYz59Gvnh+6EcEsNbzlA@public.gmane.org>
wrote:>
> Hi,
>
> I have a ruby application connecting to SQL server 2000 that throws the
> following error:
>
> ActiveRecord::StatementInvalid (DBI::DatabaseError: 24000 (0)
> [unixODBC][FreeTDS][SQL Server]Invalid cursor state: SELECT * FROM
> Personnel WHERE (name = ''mickey mouse'') ):
>
>
/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb:120:in
> `log''
>
>
/vendor/rails/activerecord/lib/active_record/connection_adapters/sqlserver_adapter.rb:485:in
> `select''
>
>
/vendor/rails/activerecord/lib/active_record/connection_adapters/sqlserver_adapter.rb:233:in
> `select_all''
> /vendor/rails/activerecord/lib/active_record/base.rb:390:in
> `find_by_sql''
> /vendor/rails/activerecord/lib/active_record/base.rb:924:in
> `find_every''
> /vendor/rails/activerecord/lib/active_record/base.rb:381:in
`find''
> /app/controllers/test.rb:3
>
> The statement obviously returns no records, and it is this condition
> that seems to throw the error.
>
> I''m guessing that the problem lies with UnixODBC or the way Rails
> interacts with it because this code works fine on Win32 where Rails is
> going directly to the Microsoft ODBC driver.
>
> Current revision levels are as follows:
>
> UnixODBC 2.2.12
> Ruby-odbc 0.9994
> Ruby-dbi 0.0.21
> Freetds 0.64
>
> Thanks,
>
> Ed
>
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---