J
jdonnell
I can't run two queries at the same time. The code below produces this
error.
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 dbiTest.rb:23
///////////////////////////////////////////////////////////////////
code
///////////////////////////////////////////////////////////////////
sth=dbh.prepare("select * from tblProductAttributeValues where
ProductAttributeID = '38'")
sth.execute
while row=sth.fetch do
id = row[0]
puts id
# everything runs fine if I remove these two lines
tmp = dbh.prepare("select top 5 * from tblDiamonds")
tmp.execute
end
error.
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 dbiTest.rb:23
///////////////////////////////////////////////////////////////////
code
///////////////////////////////////////////////////////////////////
sth=dbh.prepare("select * from tblProductAttributeValues where
ProductAttributeID = '38'")
sth.execute
while row=sth.fetch do
id = row[0]
puts id
# everything runs fine if I remove these two lines
tmp = dbh.prepare("select top 5 * from tblDiamonds")
tmp.execute
end