Forum: Ruby on Rails Strange SQL Server error

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
40a94646462b58d8b0109b5fa6655c72?d=identicon&s=25 Jonathan Conway (Guest)
on 2006-02-02 17:03
(Received via mailing list)
Hi,
In an app I'm developing I've run into a strange problem. I've created
some controllers and models using the scaffolding generator and
everything seemed to work fine.
However I've noticed that a particular model I've created always fails
its tests and I can't test it out in a browser due to the same error I'm
getting which is:

ActiveRecord::StatementInvalid (DBI::DatabaseError: S1090 (0)
[iODBC][Driver Manager]Invalid string or buffer length: SELECT * FROM
(SELECT TOP 10 * FROM (SELECT TOP 10  * FROM info_lists ) AS tmp1 ) AS
tmp2)

I'm connecting to a MS SQL Server 2000 via Freetds on a mac, which is
probably something to do with my problem. It doesn't matter if there's
data in the test database or not as it still fails.

Any help greatly appreciated

Jon
40a94646462b58d8b0109b5fa6655c72?d=identicon&s=25 Jonathan Conway (Guest)
on 2006-02-02 17:34
(Received via mailing list)
Sorry I was meant to say that I am using the Openlink ODBC drivers, not
Freetds for Mac.

Jon
7a966bb1534f0ea863bc9ffe65ae449f?d=identicon&s=25 Jamie Orchard-hays (jamieorc)
on 2006-02-02 22:18
(Received via mailing list)
You might try the Actual driver and see if it works wit that one. If
so, then you'll at least know it has something with the driver. The
free use version of the Actual driver is severely limited, but at
least you can find out if it works.

Jamie
40a94646462b58d8b0109b5fa6655c72?d=identicon&s=25 Jonathan Conway (Guest)
on 2006-02-03 13:23
(Received via mailing list)
Yeah, you're right it was the driver. In the end I went with Freetds
instead and it solved the problem.

Cheers

Jon
This topic is locked and can not be replied to.