Hi Yuri,
I always use a ds_base custom datastore class instead of the system class. For your case I would add the following instance variables and event code:
INSTANCE VARIABLES
PUBLIC:
boolean DisplayDBError // Governs DBError return value
DWBuffer DBError_Buffer
long DBError_Row
long DBError_SQLDBCode
string DBError_SQLErrText
string DBError_SQLSyntax
EVENT DBError
this.DBError_Buffer = Buffer
this.DBError_Row = Row
this.DBError_SQLDBCode = SQLDBCode
this.DBError_SQLErrText = SQLErrText
this.DBError_SQLSyntax = SQLSyntax
if this.DisplayDBError then return 0 else return 1
ANYWHERE ELSE IN CODE
ds_base lds_data
lds_data = create ds_base
lds_data.DataObject = "d_myData"
lds_data.SetTransObject(SQLCA)
...
IF lds_data.Update( ) < 0 THEN
// Error details =>
// lds_data.DBError_SQLDBCode, lds_data.DBError_SQLErrText, ...
END IF
HTH /Michael
DW engine expects SQLNRows = 1 for each UPDATE/DELETE but DBMS returned SQLNRows = 0.
Thank you Michael