Board index » delphi » Wrong record status using cached updates (Delphi 5 and Sybase)

Wrong record status using cached updates (Delphi 5 and Sybase)

    Dear Friends

    Im having a very persistent problem using cached updates in Sybase, the
problem is the following:

This works fine: When the application retrives the records to the local
cache every record recive the status of not modified, if I edit any record
it recives the modified status, when I applyupdates the record recives the
not modified status.

This is the problem: When I insert a record (in the cache) it gets the
inserted status, then I applyupdates, at this moment the record has the not
modified status.
        But when I edit this record I just inserted the problem happens. The
record status is supposed to get Modified status, but it gets a inserted
status, so when I applyupdates again a key violation error occurs, because
he is trying to inser the record again but the record already is in the
server.

    What am I doing wrong ?

    Is this a bug ?

    How do I fix this ?

    Ill be very thankfull for any answer you can give me !!!

    Mauricio

 

Re:Wrong record status using cached updates (Delphi 5 and Sybase)


Maurico,

Are you using Tranactions and if so, what is the TransIsolation settings you
are using?

Quote
Mauricio <deside...@atc.com.br> wrote in message

news:8kisau$8pl8@bornews.borland.com...
Quote
>     Dear Friends

>     Im having a very persistent problem using cached updates in Sybase,
the
> problem is the following:

> This works fine: When the application retrives the records to the local
> cache every record recive the status of not modified, if I edit any record
> it recives the modified status, when I applyupdates the record recives the
> not modified status.

> This is the problem: When I insert a record (in the cache) it gets the
> inserted status, then I applyupdates, at this moment the record has the
not
> modified status.
>         But when I edit this record I just inserted the problem happens.
The
> record status is supposed to get Modified status, but it gets a inserted
> status, so when I applyupdates again a key violation error occurs, because
> he is trying to inser the record again but the record already is in the
> server.

>     What am I doing wrong ?

>     Is this a bug ?

>     How do I fix this ?

>     Ill be very thankfull for any answer you can give me !!!

>     Mauricio

Re:Wrong record status using cached updates (Delphi 5 and Sybase)


Hi Mauricio

Quote
>    What am I doing wrong ?

      You are doing nothing wrong

Quote
>    Is this a bug ?

      Yes it is a bug of CachedUpdates (it has nothing to do with the
Database you are working with)

Quote
>    How do I fix this ?

      I'm affraid the only way to fix it is to Close and Open the Query
after ApplyUpdates

Nicholas Arvanitidis
Electrical Engineer
Greece

Re:Wrong record status using cached updates (Delphi 5 and Sybase)


This problem is not for Sybase only but for all SQL Servers and i am having
it too for too much time.
Having a close and a open is quite expensive on a network and I would like
to know if it is a Bug and if not what does Team B have to say about this.
Didier
Quote
Nicholas Arvanitidis wrote:
> Hi Mauricio

> >    What am I doing wrong ?
>       You are doing nothing wrong

> >    Is this a bug ?
>       Yes it is a bug of CachedUpdates (it has nothing to do with the
> Database you are working with)

> >    How do I fix this ?

>       I'm affraid the only way to fix it is to Close and Open the Query
> after ApplyUpdates

> Nicholas Arvanitidis
> Electrical Engineer
> Greece

Other Threads