TIBCO ActiveMatrix® Adapter for Database subscription service cannot update a table with only primary columns.

TIBCO ActiveMatrix® Adapter for Database subscription service cannot update a table with only primary columns.

book

Article ID: KB0086351

calendar_today

Updated On:

Products Versions
TIBCO ActiveMatrix BusinessWorks Plug-in for Database -
Not Applicable -

Description

Resolution:
Description:
============
TIBCO ActiveMatrix® Adapter for Database subscription service cannot update/upsert a table with only key columns.

Environment:
===========
Windows/Linux/AIX/Solaris/HP platform.
All Databases
ADB Adapter 5.X, 6.X.

Symptoms:
==========
For an update operation, the current implementation of TIBCO ActiveMatrix® Adapter for Database will use key columns only in the where clause of an SQL script such as:

update &ltdestination table> set &ltcol1>=?, &ltcol2>=?, ... where &ltkey column 1>=? and &ltkey column 2>=?

Data in key columns will not be updated.

If a table only contains key columns then the update SQL script syntax will be incorrect  such as the following:

update &ltdestination table> where &ltkey column 1>=? and &ltkey column 2>=?

An error will be thrown when executing the script. When working with Oracle, the error would resemble the following:


    DBError: Database driver code: HY000
    Database server code: 1747
    Database driver message: [Data Direct][ODBC Oracle Wire Protocol driver][Oracle]ORA-01747: invalid

user.table.column, table.column, or column specification

Resolution:
=========
Use delete and insert instead of update when updating data in key columns. (Send two messages, the first one with ADB_OPCODE=3 and the latter with ADB_OPCODE=1).

Issue/Introduction

TIBCO ActiveMatrix® Adapter for Database subscription service cannot update a table with only primary columns.