Linked Server DB2 problem

Last Post 08 Jul 2004 05:42 AM by Kendo_SQL. 2 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
Kendo_SQL
New Member
New Member

--
08 Jul 2004 04:51 AM
I get the following error in my SQL 2000 database, when trying to update an AS400 table via a linked server:

Server: Msg 7391, Level 16, State 1, Procedure spUploadAllocationTrackHeader, Line 89
[Microsoft][ODBC SQL Server Driver][SQL Server]The operation could not be performed because the OLE DB provider 'MSDASQL' was unable to begin a distributed transaction.


Attempting an update with:
INSERT OPENQUERY(LS_HMVCASW1,
'SELECT
CSIUID, CSIYR, CSICAM, CSISKU, CSIQTY, CSICST, CSIDIS,
CSIRET, CSIRT2, CSIRT3, CSIMRG, CSICAT, CSIART, CSITTL,
CSISUP, CSIREC, CSIFMT, CSIWAS, CSISTS
FROM
WARDOUR1.PCUPDDTA.CASITM
WHERE 1=0') --ADD WHERE 1=0 TO STOP QUERY RETURNING ANY VALUES


SELECT etc....


LS_HMVCASW1 is a linked server using MS OLE DB driver for ODBC databases. The AS/400 table has no keys on the fields and journalling is set on.

Totally baffled by this. Does anyone have any idea what to look into to resove this problem? It was working before...
Kendo_SQL
New Member
New Member

--
08 Jul 2004 05:14 AM
No, no changes.

I'm working on the theory of dodgy data at the moment. Will post info if I make any breakthroughs.
Kendo_SQL
New Member
New Member

--
08 Jul 2004 05:42 AM
It turns out the recordset I was trying to update to the '400 contained a NULL value in a field and the corresponding field on the AS400 had been compiled not to accept null values. However no helpful error messages on either the AS400 or SQL Server meant I spent days trying to work this out!
You are not authorized to post a reply.

Acceptable Use Policy