Forum: Ruby on Rails Strange SQL Server error

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Jonathan Conway (Guest)
on 2006-02-02 18:03
(Received via mailing list)
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

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

Jonathan Conway (Guest)
on 2006-02-02 18:34
(Received via mailing list)
Sorry I was meant to say that I am using the Openlink ODBC drivers, not
Freetds for Mac.

Jamie O. (Guest)
on 2006-02-02 23: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.

Jonathan Conway (Guest)
on 2006-02-03 14: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.


This topic is locked and can not be replied to.