BizTalk DB2 Adapter SQLCODE 510

When trying to use the DB2 adapter on a receive location with the Update Command and receiving the below error, be sure your have FOR UPDATE and WITH NC on your select statement.

“The adapter “DB2” raised an error message. Details “A SQL error has occurred. Please consult the documentation for your specific DB2 version for a description of the associated Native Error and SQL State. SQLSTATE: 42828, SQLCODE: -510″.”

SELECT 
    CAST(F47046.SYEKCO AS varchar(50)) AS SYEKCO,  
    CAST(F47046.SYEDCT AS varchar(50)) AS SYEDCT,
    CAST(F47046.SYEDOC AS varchar(50)) AS SYEDOC, 
    F47046.SYEDSP  
FROM 
    F47046 
WHERE 
    F47046.SYEDSP = ' ' AND 
    F47046.SYAN8 = 900542 
FOR UPDATE 
WITH NC

UPDATE F47046 SET SYEDSP = 'P' WHERE CURRENT OF <CURSOR>
Advertisements
This entry was posted in BizTalk Server. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s