I want to develop a RoR application using MS SQL Express but I cannot figure out how to connect to the database. I tried
development:
adapter: sqlserver
database: historicDB
username: dxt
password: dxt
host: DBI:ADO:Provider=SQLNCLI;Data Source=localhost\SQLEXPRESS;InitialCatalog=historicDB;User Id=dxt;Password=dxt;
and
development:
adapter: sqlserver
database: historicDB
host: localhost\SQLEXPRESSS
username: dxt
password: dxt
I also installed dbi,dbd-odbc,activerecord-sqlserver-adapter but nowthing works I always get
ActiveRecord::ConnectionNotEstablished
on the welcome screen
First, use the TinyTDS gem and consult this page on using a named instance. https://github.com/rails-sqlserver/activerecord-sqlserver-adapter/wiki/Using-TinyTds
You should be able to do this:
development:
adapter: sqlserver
database: historicDB
dataserver: localhost\SQLEXPRESSS
username: dxt
password: dxt
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With