J
jd33526
I get this error when I try to run the following code. Anyone have any
ideas why it's not working?
c:/ruby/lib/ruby/site_ruby/1.8/DBD/ADO/ADO.rb:135:in `execute': Execute
(DBI:atabaseError)
OLE error code:80004005 in Microsoft OLE DB Provider for SQL Server
Cannot create new connection because in manual or distributed
transactionmode.
HRESULT error code:0x80020009
Exception occurred. from
c:/ruby/lib/ruby/site_ruby/1.8/dbi/dbi.rb:768:in `execute'
from test.rb:12
///////////////////////////////////////////////////////////////////
code
///////////////////////////////////////////////////////////////////
sth=dbh.prepare("select * from products where id = '38'")
sth.execute
while row=sth.fetch do
manf_id = row[5]
tmp = dbh.prepare("select * from manufacturers where id = " +
manf_id.to_s)
tmp.execute #this is the line that fails
end
ideas why it's not working?
c:/ruby/lib/ruby/site_ruby/1.8/DBD/ADO/ADO.rb:135:in `execute': Execute
(DBI:atabaseError)
OLE error code:80004005 in Microsoft OLE DB Provider for SQL Server
Cannot create new connection because in manual or distributed
transactionmode.
HRESULT error code:0x80020009
Exception occurred. from
c:/ruby/lib/ruby/site_ruby/1.8/dbi/dbi.rb:768:in `execute'
from test.rb:12
///////////////////////////////////////////////////////////////////
code
///////////////////////////////////////////////////////////////////
sth=dbh.prepare("select * from products where id = '38'")
sth.execute
while row=sth.fetch do
manf_id = row[5]
tmp = dbh.prepare("select * from manufacturers where id = " +
manf_id.to_s)
tmp.execute #this is the line that fails
end