Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Linked Server calling proc on db2/400

Author  Topic 

snufse
Constraint Violating Yak Guru

469 Posts

Posted - 2009-04-07 : 15:53:34
I am using Microsoft OLE DB for DB2. Now when I do a query like this:

SELECT *
FROM OPENQUERY(AS400SRV_MSOLEDB, 'Select * from rjadevlib.f55125')

Things are working fine.

When I use a linked server and call a proc on db2/400 like this:

declare @JobNumber1 char(12)
set @JobNumber1 = ' 3505040'

CREATE TABLE #JDE_EqmTable
( jde_cost_code nvarchar(15) unique,
jde_sum_hrs decimal(10,2),
jde_uom char(2)
)
insert into #JDE_EqmTable
Exec ('Call QGPL.get_eqmqty(?)', @JobNumber1) AT AS400SRV_MSOLEDB

drop table #JDE_EqmTable


I get error:
Msg 7390, Level 16, State 2, Line 73
The requested operation could not be performed because OLE DB provider "DB2OLEDB" for linked server "AS400SRV_MSOLEDB" does not support the required transaction interface.

If I remove the "Insert into...." it works fine.




   

- Advertisement -