I'm trying to connect the rail to SQL Server. I have installed the activerecord-sqlserver-adapter and ruby-odbc gem, but I'm not sure what to put in my database.iml file.
What is actually a DSN, and why do I need it? (Is this some Windows specific thing?)
What should I do if I want to use Windows authentication instead of specifying a username and password?
I tried to create a DSN, specify the Windows NT authentication, and put it into my config.yml in the following:
development: adapter: sqlserver dsn: myDsn Mode: odbc
But I get an "Specified DSN in between an architecture mismatch between the driver and the application" error [I can also create DSN from windows / system 32 / obdbcd 32. xe Tried, because a Google search has said it will make a 32-bit DSN, but I'm one I get the error.]
Am I missing something in my database.yml file?
Update: I tried to use the
development: adapters: sqlserver mode: odbc dsn: provider = sqlledb; Data source =. \ SQLEXPRESS; Integrated Security = SSPI
But I get the "Data source name is not found and no default driver specified" error is found. Is it possible that my provider is not SQLOLEDB? [I do not know what a provider is or how it should be known - I've copied it to another connection string.) I know that I can connect to it. \ SQLEXPRESS is my windows virtual SQL Server Management Studio program.
A DSN is a "database source name." It requires an ODBC driver to connect to a specific database.
Perhaps this SE Q & A will help you:
See also for general help with connection string. / P>
Comments
Post a Comment