Default Database with ODBC and SQL Server

I’m trying to set up a Rails application to use an ODBC connection to
a MS SQL Server 2005 system. I’m finding that if I don’t specify a
default database the connection works, but if I do the connection
fails. Does anyone know why this might be?

James