D
dkmd_nielsen
I know you guys have beaten this subject to death, but I'm just not
getting a connection to SqlServer 2005. It is installed locally, with
an instance name of DVN-P548. I use my windows user name and password
to log in.
require 'rubygems'
require_gem 'activerecord'
ActiveRecord::Base.establish_connection(
:adapter => 'sqlserver',
:mode => 'ADO',
:host => 'P548-DVN',
:dsn => '???', ** what is this supposed
to be???
:database => 'CountsAAN',
:username => 'my_windows_userid',
assword => 'my_password'
)
class WiRecord < ActiveRecord::Base
end
Errors I get returned are either "Server does not exist or access is
denied" (thanks, MS, for narrowing this one down a bit), or "user is
not trusted", depending on what values I have attempted for host and
dsn. What is host and dsn? Believe it or not, I do not find a clear
definition in the rails handbook.
Do I want to use ADO, or should I use ODBC? If odbc, where does one
find the connection string? Being a windows user, I'm so used to
having everything done for me under the covers that I don't understand
any of the underlying details.
Thanks for everything,
dvn
getting a connection to SqlServer 2005. It is installed locally, with
an instance name of DVN-P548. I use my windows user name and password
to log in.
require 'rubygems'
require_gem 'activerecord'
ActiveRecord::Base.establish_connection(
:adapter => 'sqlserver',
:mode => 'ADO',
:host => 'P548-DVN',
:dsn => '???', ** what is this supposed
to be???
:database => 'CountsAAN',
:username => 'my_windows_userid',
assword => 'my_password'
)
class WiRecord < ActiveRecord::Base
end
Errors I get returned are either "Server does not exist or access is
denied" (thanks, MS, for narrowing this one down a bit), or "user is
not trusted", depending on what values I have attempted for host and
dsn. What is host and dsn? Believe it or not, I do not find a clear
definition in the rails handbook.
Do I want to use ADO, or should I use ODBC? If odbc, where does one
find the connection string? Being a windows user, I'm so used to
having everything done for me under the covers that I don't understand
any of the underlying details.
Thanks for everything,
dvn