Re: Row cannot be located for updating

From: Nicola (malpede.n_at_tiscali.it)
Date: 10/12/04


Date: 12 Oct 2004 13:36:40 -0700


Value 0 appears only after posting the record, but it shouldn’t be 0!
I didn’t write any single line of code, apart the ones in the AfterPost event.
I forgot something in the previous message.
Setting the AutoGenerateValue of the persistent field ID (the autoincrement field in the table) to arAutoInc is totally useless.
Apparently, no solution to the problem…
P.S. If the primary key is set on other kind of fields everything works.

Brian Bushay TeamB <BBushay@Nmpls.com> wrote:
>>I create a very simple Access 97 database and I connect through Jet 4 and
>>ADO.
>>
>>The table have a primary key based on an Autoincrement field.
>>
>>I use ADODataset (CursorLocation = clUseClient and CursorType = ctStatic).
>>
>>When I add a new record the Autoincrement field is not filled with the
>>proper value but always with 0.
>
>You are not supposed to get a value for the AutoIncrment field until you post
>the record. You should not see 0 as the value either you must have some code
>that is adding the 0 value and that is probably your problem.
>
>
>--
>Brian Bushay (TeamB)
>Bbushay@NMPLS.com



Relevant Pages

  • Row cannot be located for updating
    ... I have a master table and a detail table. ... (autoincrement field and primary key in MasterTable) ... with the proper ID value! ... I've just discovered that even the primary key of MasterTable ...
    (borland.public.delphi.database.ado)
  • Re: Row cannot be located for updating
    ... Both primary keys in MasterTable and DetailTable are Autoincrement field ... But the problem seems to be on the Primary key fields, ... > The master linking field in the detail table needs to be of type Integer ...
    (borland.public.delphi.database.ado)
  • Re: Modifying Sql server data through Access
    ... add a column with an identity value (or autoincrement field in SQL ... Sylvain Lafontaine, ing. ... I cannot give primary key to some of the tables as some tables are temp ...
    (microsoft.public.access.adp.sqlserver)
  • Re: Sort order of Access table without index
    ... Yes, Viatcheslav is correct. ... Without the autoincrement field (used as a ... primary key also), there is not real DB that guarantees it will maintain ... physical chronological order. ...
    (borland.public.delphi.database.ado)