Hello
I'm testing IBDAC 2.0 with Firebird 2.0.
I want that update sentences using primary key and a change_stamp field (its type is TIMESTAMP) in where clause to update the a record:
UPDATE "DESCRIPTOR_CATEGORIES"
SET
"DESCRIPTOR_CATEGORY_ID" = :"DESCRIPTOR_CATEGORY_ID", "DESCRIPTOR_CATEGORY" = :"DESCRIPTOR_CATEGORY", "ORDER" = :"ORDER", "APP_SESSION_ID" = :"APP_SESSION_ID"
WHERE
"DESCRIPTOR_CATEGORY_ID" = :"Old_DESCRIPTOR_CATEGORY_ID"
AND "CHANGE_STAMP" = :"Old_CHANGE_STAMP"
The SQL sentence is:
select * from DESCRIPTOR_CATEGORIES
The Refresh Query is:
SELECT "DESCRIPTOR_CATEGORIES"."DESCRIPTOR_CATEGORY_ID", "DESCRIPTOR_CATEGORIES"."DESCRIPTOR_CATEGORY", "DESCRIPTOR_CATEGORIES"."ORDER", "DESCRIPTOR_CATEGORIES"."CHANGE_STAMP", "DESCRIPTOR_CATEGORIES"."APP_SESSION_ID" FROM "DESCRIPTOR_CATEGORIES"
WHERE
"DESCRIPTOR_CATEGORY_ID" = :"DESCRIPTOR_CATEGORY_ID"
When trying to apply changes to database an exception is raised:
"Project IBDacTest.exe raised exception class EDatabaseError with message 'Update failed. Found 0 records'."
The monitor shows the following information:
select * from DESCRIPTOR_CATEGORIES
UPDATE "DESCRIPTOR_CATEGORIES"
SET
"DESCRIPTOR_CATEGORY_ID" = :"DESCRIPTOR_CATEGORY_ID", "DESCRIPTOR_CATEGORY" = :"DESCRIPTOR_CATEGORY", "ORDER" = :"ORDER", "CHANGE_STAMP" = :"CHANGE_STAMP", "APP_SESSION_ID" = :"APP_SESSION_ID"
WHERE
"DESCRIPTOR_CATEGORY_ID" = :"Old_DESCRIPTOR_CATEGORY_ID"
AND CHANGE_STAMP = :OLD_CHANGE_STAMP
:DESCRIPTOR_CATEGORY_ID(INTEGER)=3
:DESCRIPTOR_CATEGORY(VARCHAR[11])='Hobbies DDD'
:ORDER()=20
:CHANGE_STAMP(TIMESTAMP)=26/04/2007
:APP_SESSION_ID(INTEGER)=265
:Old_DESCRIPTOR_CATEGORY_ID(INTEGER)=3
:OLD_CHANGE_STAMP(TIMESTAMP)=26/04/2007
I use CHANGE_STAMP to manage concurrency.
Could somebody help me with this issue?
Thanks in advance.
TimeStamp in Where clause
Hello
Product Versions:
Core Lab IBDAC 2.00.0.6 for Delphi 2007
Firebird 2.0.0.12748
Delphi 2007 Trial
A complete test case (only 38 kB) can be downloaded from
http://www.it-builder.com.ar/repository/IbDacTest.rar
I hope this help.
Thank for your quick response.
Mauricio Magni.
Product Versions:
Core Lab IBDAC 2.00.0.6 for Delphi 2007
Firebird 2.0.0.12748
Delphi 2007 Trial
A complete test case (only 38 kB) can be downloaded from
http://www.it-builder.com.ar/repository/IbDacTest.rar
I hope this help.
Thank for your quick response.
Mauricio Magni.