Board index » delphi » BDE bug with cached updates???

BDE bug with cached updates???

Is this really a bug in the BDE????

Fergus

Please find here the steps to reproduce problem :

1)  Start your Delphi 4 (Delphi 3)
2)  Open demo project c:\Program Files\Borland\Delphi
4\Demos\Db\Cachedup\cache.dpr
    Note that this is not bug of this demo project, but serious bug of
BDE.
3)  Run application
4)  Check "Use Update SQL"
5)  Click Insert button on DBNavigator
6)  Fill ProjID='IS', ProjectName='IS'
7)  Press "ApplyUpdates" button - BDE correctly inserts new record
8)  Modify your new record to break UNIQUE constraint (eg.
ProjID='VBASE')
9)  Press "ApplyUpdates" - BDE tries to update record, but exception is
raised
10) Press "Abort" to rollback transaction.
10) Modify again your record to be valid (eg. ProjID='IS' or
ProjID='XXXX')
11) Press "ApplyUpdates" - BDE now !!!!!INSERTS!!!!! record again
instead of updating as in step 9)

How to recognize bug:
- if you fill ProjID='IS' in step 10) you get an exception again,
because buggy insert
  violates UNIQUE constraint of column ProjID or ProjectName ('IS record
is already in table from step 7)).
- if you fill ProjID='XXXX' and ProjectName='XXXX' in step 10) then
record 'XXXX' is successfully inserted,
  but old record 'IS' remains. So after pressing "Re-execute Query"
button you will see both
  'XXXX' and 'IS' records.

This bug appear in
- Delphi C/S 3.02 with BDE 4.01 or 4.51
- Delphi C/S 4.00 and BDE 5.00

 

Re:BDE bug with cached updates???


Quote
>10) Press "Abort" to rollback transaction.

I do not have Interbase installed, so I am unable to test this, but it seems
to me that transaction control is off.

The BDE alias IBLOCAL has SQLPASSTHRUMODE=SHARED AUTOCOMMIT on my system,
which means that you have no rollback option.

Is that the problem??

Roger

Re:BDE bug with cached updates???


Quote
>I do not have Interbase installed, so I am unable to test this, but it
seems
>to me that transaction control is off.

I've gotten the same problem with Delphi 3, BDE 4.51 and Oracle 7.3.

[]'s

Zed

Other Threads