Hi,
A Rails app can connect to SQL Server 2005 Express. The main issue of which
to be aware, though, is that Express installs as a named instance by
default. Therefore, in your database.yml file, you must provide both the
server name (your machine name) and the named instance (SQLEXPRESS by
default). For example:
test:
adapter: sqlserver
mode: ado
database: sql2k5_spike_test
username: user
password: pwd
host: DBI:ADO:Provider=SQLOLEDB;Data Source=MACHINE_NAME\SQLEXPRESS;
Note that I had to use uppercase for the machine\instance. Furthermore,
neither localhost (uppercase or lowercase) nor 127.0.0.1 would suffice in
place of my machine name. This is unfortunate if multiple people will be
working on the project, as each of their machine names will be unique.
Therefore, you should consider installing Express as a default (unnamed)
instance. If you''ve already installed as a named instance,
you''ll have to
reinstall as a default instance. Then you can just use localhost in place of
machine\instance for development and test.
test:
adapter: sqlserver
mode: ado
database: sql2k5_spike_test
username: user
password: pwd
host: DBI:ADO:Provider=SQLOLEDB;Data Source=localhost;
Almost forgot.... I did all of this on Windows XP Pro, as I don''t have
access to Vista. You''ll just have to give it a try and let us know how
it
goes. :-)
Regards,
Craig
On 5/25/07, Jason Crovert
<rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>
wrote:>
>
>
> I was looking at the Wiki in regards to info on getting Rails and SQL
> Express 2005 to place nice together but the wiki seems to have some old
> material on it. Can anyone tell me if Rails does indeed support SQL
> Express 2005 and how to go about correctly adding support for it from a
> Windows (Vista) machine? Also, is anyone currently using SQL Express
> 2005 and Rails together?
>
> Here is the page I was reading:
> wiki.rubyonrails.org/rails/pages/HowtoConnectToMicrosoftSQLServer
>
> Thanks for your help.
>
> --
> Posted via ruby-forum.com.
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---