MSSQL error - 80004005 & Rails

hey there folks, i have a bit of a sitch here and i would love some
help/input on it.

i’ve inherited a horrible asp/mssql app that i’m re-writting using
rails, but unfortunately i have to keep the asp version up and running.
in order to do so i’ve had to write some admin functions, which i’ve
done in rails. because the mssql schema wasn’t written very well i’ve
had to override the table and primary keys for active record. my
‘user.rb’ file looks like this.

class User < ActiveRecord::Base
set_table_name “users”
set_primary_key “user_id”

i’m not having any problems reading from the database (sql server 2000),
but when i try to update something i get the following error:

ActiveRecord::StatementInvalid: DBI::DatabaseError: Execute
OLE error code:80004005 in Microsoft OLE DB Provider for SQL Server
Cannot create new connection because in manual or distributed
transaction mode.
HRESULT error code:0x80020009
Exception occurred.: SELECT @@ROWCOUNT AS AffectedRows: UPDATE
users SET [sb_username] = ‘’, [hl_perclick_replenish] = NULL, [fname] =
‘Mark’, [ccExpYear] = NULL, [nameoncard] = ‘’, [hl_perclick_method] =
NULL, [ccType] = NULL, [hl_perclick_charged_date] = NULL,
[where_heard_code] = NULL, [deleted] = 0, [cookie_expires] = NULL,
[bill_state] = NULL, [userTyp] = 1, [cookie_id] = NULL, [phone] = NULL,
[bill_city] = ‘’, [referer] = ‘’, [rank_elig] = NULL,
[hl_perclick_budget] = NULL, [address2] = ‘’, [browser] = ‘Mozilla/5.0
(Macintosh; U; PPC Mac OS X Mach-O; en-US; rv: Gecko/20060111
Firefox/’, [bio] = NULL, [login_name] = ‘foo’, [lname] = ‘bar’,
[hl_perclick_charged] = NULL, [hl_active] = 0, [zip] = ‘’, [address1] =
‘’, [modDT] = NULL, [country] = NULL, [province] = ‘’, [password] =
‘password’, [ccNum] = ‘’, [hearabout] = ‘Foo B.’, [last_logon] = NULL,
[site] = ‘hk’, [creatDT] = ‘2006-03-08 11:48:09’, [ccExpMonth] = NULL,
[email] = ‘[email protected]’ WHERE user_id = 10560.0

does anybody have any ideas how i can fix this?? please please please
help. thanks.

Got the same problem.

Does anyone have a solution for this?

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs