Connecting to SQL Server

  • Thread starter Clinton D. Judy
  • Start date
C

Clinton D. Judy

So ActiveRecord has failed me. The sqlserver module isn't complete, and
I'm getting "zombie state" errors, essentially because Rails wants to
maintain a connection to SQL server and SQL server is used to ASP.net
making connections to the server for every request. (Yuck, but that's
what I have to work with here.) Is there a ruby gem that's been
maintained to use SQL Server better? I can't find one, but someone's
gotta be working on one with how common SQL Server is.

=20

I don't even use most of the "cool" features ActiveRecord has as I have
a DBA here who insists on using stored procedures for everything. That's
an industry standard, but not the Rails way, and thus another roadblock
in my Rails application.

=20

If there isn't anything, I'll research creating my own gem to do the
task. Obviously I'd rather not duplicate efforts. Thanks!

=20

Clinton Judy

Web Developer

Glenn O. Hawbaker, Inc.

=20
 
D

Dejan Dimic

So ActiveRecord has failed me. The sqlserver module isn't complete, and
I'm getting "zombie state" errors, essentially because Rails wants to
maintain a connection to SQL server and SQL server is used to ASP.net
making connections to the server for every request. (Yuck, but that's
what I have to work with here.) Is there a ruby gem that's been
maintained to use SQL Server better? I can't find one, but someone's
gotta be working on one with how common SQL Server is.

I don't even use most of the "cool" features ActiveRecord has as I have
a DBA here who insists on using stored procedures for everything. That's
an industry standard, but not the Rails way, and thus another roadblock
in my Rails application.

If there isn't anything, I'll research creating my own gem to do the
task. Obviously I'd rather not duplicate efforts. Thanks!

Clinton Judy

Web Developer

Glenn O. Hawbaker, Inc.

I am too often in same situation. For this I use the activerecord-
sqlserver-adapter.
Kipping the business logic in SQL stored procedures is a product of
one development school.
Do not want to enter in discussion about pros and cons of that
decision but it’s a reality of life.
Thing that bother me even more is a column naming convention that is
usually used in MS SQL databases.
In almost all my Models has to explicitly define a table name and a
primary key name.

However, I have managed to communicate with MS SQL in satisfactory
faction.
 
C

Clinton D. Judy

Actually, last night I JUST figured out a solution. I wrapped all of my =
connection.select_alls in connection.transactions. Done. Somehow, Rails =
closes the objects properly for SQL Server when I do that.

Hopefully that helps someone. :)

-----Original Message-----
From: Dejan Dimic [mailto:[email protected]]=20
Sent: Tuesday, September 09, 2008 3:19 AM
To: ruby-talk ML
Subject: Re: Connecting to SQL Server
Importance: High

So ActiveRecord has failed me. The sqlserver module isn't complete, = and
I'm getting "zombie state" errors, essentially because Rails wants to
maintain a connection to SQL server and SQL server is used to ASP.net
making connections to the server for every request. (Yuck, but that's
what I have to work with here.) Is there a ruby gem that's been
maintained to use SQL Server better? I can't find one, but someone's
gotta be working on one with how common SQL Server is.

I don't even use most of the "cool" features ActiveRecord has as I = have
a DBA here who insists on using stored procedures for everything. = That's
an industry standard, but not the Rails way, and thus another = roadblock
in my Rails application.

If there isn't anything, I'll research creating my own gem to do the
task. Obviously I'd rather not duplicate efforts. Thanks!

Clinton Judy

Web Developer

Glenn O. Hawbaker, Inc.

I am too often in same situation. For this I use the activerecord-
sqlserver-adapter.
Kipping the business logic in SQL stored procedures is a product of
one development school.
Do not want to enter in discussion about pros and cons of that
decision but it's a reality of life.
Thing that bother me even more is a column naming convention that is
usually used in MS SQL databases.
In almost all my Models has to explicitly define a table name and a
primary key name.

However, I have managed to communicate with MS SQL in satisfactory
faction.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,968
Messages
2,570,153
Members
46,701
Latest member
XavierQ83

Latest Threads

Top