I'm using CachedUpdates with an implementation of the 'ApplyRecord' event (all the changes to the DB are managed by an external unit).
In fact, TOracleDataSet is used only to provide a datasource for an advanced grid control.
It is bit long to explain you the full context, but I have a problem because the query does not contains a ROWID.
I found a workaround by aliasing ROWNUM to ROWID.
I made some tries, it seems to work fine but I'm not sure that there is no unexpected effects.
Here you will find the underling query (please use the SQL Beautifier) :
select ACCOUNT,
RELEASE,
CATEGORY,
TAX_CODE,
AMT_INVOICED,
AMT_TAX,
AMT_INVOICED_CUR,
TAX_FED_CUR,
ROWNUM "ROWID"
from (select VENDOR_NUMBER,
INVOICE_NUMBER,
ACCOUNT,
RELEASE,
CATEGORY,
VOUCHER_NO,
TAX_CODE,
sum(AMOUNT_INVOICED) AMT_INVOICED,
sum(AMT_TAX_FED) AMT_TAX,
sum(AMT_INVOICED_CUR) AMT_INVOICED_CUR,
sum(AMT_TAX_FED_CUR) TAX_FED_CUR
from JOBSCOPE.INVOICE_FILE
where PAYMENT_STATUS 'O'
and CODE_RETENTION = ' '
and VOUCHER_NO like 'CF252462'
and COMPANY_CODE = 'CC'
group by VENDOR_NUMBER,
INVOICE_NUMBER,
ACCOUNT,
RELEASE,
CATEGORY,
VOUCHER_NO,
TAX_CODE)
In fact, TOracleDataSet is used only to provide a datasource for an advanced grid control.
It is bit long to explain you the full context, but I have a problem because the query does not contains a ROWID.
I found a workaround by aliasing ROWNUM to ROWID.
I made some tries, it seems to work fine but I'm not sure that there is no unexpected effects.
Here you will find the underling query (please use the SQL Beautifier) :
select ACCOUNT,
RELEASE,
CATEGORY,
TAX_CODE,
AMT_INVOICED,
AMT_TAX,
AMT_INVOICED_CUR,
TAX_FED_CUR,
ROWNUM "ROWID"
from (select VENDOR_NUMBER,
INVOICE_NUMBER,
ACCOUNT,
RELEASE,
CATEGORY,
VOUCHER_NO,
TAX_CODE,
sum(AMOUNT_INVOICED) AMT_INVOICED,
sum(AMT_TAX_FED) AMT_TAX,
sum(AMT_INVOICED_CUR) AMT_INVOICED_CUR,
sum(AMT_TAX_FED_CUR) TAX_FED_CUR
from JOBSCOPE.INVOICE_FILE
where PAYMENT_STATUS 'O'
and CODE_RETENTION = ' '
and VOUCHER_NO like 'CF252462'
and COMPANY_CODE = 'CC'
group by VENDOR_NUMBER,
INVOICE_NUMBER,
ACCOUNT,
RELEASE,
CATEGORY,
VOUCHER_NO,
TAX_CODE)