Board index » delphi » BIG PROBLEM OR NOT BIG PROBLEM with ADO?

BIG PROBLEM OR NOT BIG PROBLEM with ADO?

Hi, I have sent the following message many times in the last 6 month, but I
haven't receveid a clear answer from TeamB yet. I have seen that other
people have the same problem and I don't know why borland don't tell us
which is the problem or how to workaround it. I can't understand whether my
question isn't clear or my problem has to be solved by Microsoft.

Here following you will find the message that I have already sent to.

Hi, I use D5 with ADOExpress ( + ADOExpress patch) on Access2K database. The
problem occurs when I insert a record in my grid and after having posted it
I try to EDIT the same record. Infact after editing some fields and trying
to post the record, my program shows a message "Impossible locate the Row
for the update. Some values could be modified after the last read
operation." (I translated the message from Italian to English).
(I have tried to change the CURSORLOCATION from clUseClient to clUseServer,
but I haven't solved the problem).

How can I do? Which is the problem? Who is in charge to solve my problem (if
possible...) ?

Thanks in advance,
Renzo Contarini

 

Re:BIG PROBLEM OR NOT BIG PROBLEM with ADO?


Quote
Renzo Contarini <rco...@sierrasoft.com> wrote in message

news:86h4bc$mdt6@bornews.borland.com...

Quote
> Hi, I have sent the following message many times in the last 6 month, but I
> haven't receveid a clear answer from TeamB yet. I have seen that other
> people have the same problem and I don't know why borland don't tell us
> which is the problem or how to workaround it. I can't understand whether my
> question isn't clear or my problem has to be solved by Microsoft.

As far as I know this is a limitation with ADO and/or the specific provider you
are using.  You can try setting up a test using ADO directly to see if you get
the same error.  Make sure you configure with the same
CursorType/CursorLocation/Locktype settings.  If the error only occurs with
ADOExpress, then I can take a look and see what the problem is.  However, when
it comes to updating it's done pretty much entirely at the ADO level so I don't
imagine it will work with direct ADO either.

You might want to try the MS public ADO newsgroup to see if anyone there can
help you with this.

Mark

Re:BIG PROBLEM OR NOT BIG PROBLEM with ADO?


Mark Edington (Borland) ha scritto nel messaggio
<86irpm$ne...@bornews.borland.com>...

Quote

>As far as I know this is a limitation with ADO and/or the specific provider
you
>are using.

My Provider is:
DB_Provider='Provider=Microsoft.Jet.OLEDB.4.0;';

Quote
>You can try setting up a test using ADO directly to see if you get
>the same error.

How can to try a test using ADO directly? Must I to use ADOX_TLB or what?

Thanks Mark,
Renzo Contarini

Re:BIG PROBLEM OR NOT BIG PROBLEM with ADO?


Mark Edington (Borland) ha scritto nel messaggio
<86irpm$ne...@bornews.borland.com>...

Quote
>Renzo Contarini <rco...@sierrasoft.com> wrote in message
>news:86h4bc$mdt6@bornews.borland.com...
>As far as I know this is a limitation with ADO and/or the specific provider
you
>are using.  You can try setting up a test using ADO directly to see if you
get
>the same error.  Make sure you configure with the same
>CursorType/CursorLocation/Locktype settings.  If the error only occurs with
>ADOExpress, then I can take a look and see what the problem is.  However,
when
>it comes to updating it's done pretty much entirely at the ADO level so I
don't
>imagine it will work with direct ADO either.

>You might want to try the MS public ADO newsgroup to see if anyone there
can
>help you with this.

>Mark

Mark I posted my question in MS ADO newsgroup and I received the following
message, I hope that can help other users.

Thanks,
Renzo Contarini

The message is:

Quote
Constantin Roman <d...@virtualdispatch.com> wrote in message

news:ePQVrRzZ$GA.237@cppssbbsa02.microsoft.com...
 Yes. It happens
 - either when there is an autonumber field and after .Update you need a
 .Requery to get the new value
 - or when the recordset you use to update does not have a unique record -
 probably you need a field to be unique.

Re:BIG PROBLEM OR NOT BIG PROBLEM with ADO?


Quote
Renzo Contarini <rco...@sierrasoft.com> wrote in message

news:86kn37$onc10@bornews.borland.com...

Quote
> Mark I posted my question in MS ADO newsgroup and I received the following
> message, I hope that can help other users.

And does that response give you the information you need to solve the problem?
Are you using an AutoInc field with Access 97 data?

If that is the caset you might be able to resolve the issue by upgrading to an
Access 2000 format database.  I think you can also work around the problem by
calling Requery after doing the insert.

Mark

Re:BIG PROBLEM OR NOT BIG PROBLEM with ADO?


Mark Edington (Borland) ha scritto nel messaggio
<86ku64$on...@bornews.borland.com>...

Quote
>Renzo Contarini <rco...@sierrasoft.com> wrote in message
>news:86kn37$onc10@bornews.borland.com...

>And does that response give you the information you need to solve the
problem?
>Are you using an AutoInc field with Access 97 data?

Yes, it solves my problem. I have a field that I use as Autoinc (I have a
query that get this value) and this field is a primary key.

Quote
>If that is the caset you might be able to resolve the issue by upgrading to
an
>Access 2000 format database.  I think you can also work around the problem
by
>calling Requery after doing the insert.

I'm already  working with Access2000 format database, I solve my problem
calling Requery after AfterPost event of my dataset.

Thanks Mark,
Renzo Contarini

Re:BIG PROBLEM OR NOT BIG PROBLEM with ADO?


Hi!

I've encountered the same problem,
and I happen to believe it is not the so-called 'key violation', but a sync
problem.
As I seperate actions, (mosty under M/D + network use) and posted as much as
I could,
it amost gone.

But sometimes, It still happens
AND IT MAKES ME MADDDDDDDDDDDD

;)

If you'll have any soultion or more info,
I'll be gratefull to hear.

10x,

  Lior.

Re:BIG PROBLEM OR NOT BIG PROBLEM with ADO?


Mark,

Quote
> And does that response give you the information you need to solve the
problem?
> Are you using an AutoInc field with Access 97 data?

> If that is the caset you might be able to resolve the issue by upgrading
to an
> Access 2000 format database.  I think you can also work around the problem
by
> calling Requery after doing the insert.

Just for your information, as well as anyone else reading this, I just ran
into the same problem with an Access 2000 table of the following structure:

Species: char(3)
Grade: char(3)
Cost: double
Price: double

The primary key is the Species/Grade combination.  Putting a Requery
statement in the OnAfterPost event of the table in question solved the
problem.

-Eric Harmon

Other Threads