Board index » delphi » Record Hidden after insert a new record

Record Hidden after insert a new record

Hi,

When i insert a new record with the help of a Dbnavigator
The first one I insert is inserted as first record.
After I insert a second record the first is hidden
and can't access it by browsing with the DBnavigator.
If i insert a Third the second is hidden etc...

If i close the application then reopen it, all the record
are displayed but they are shown at the end of the database.

What's wrong ?

Using : Win98,D3.02,Access 97 database with ODBC driver.

Thanks to all repliers for their wise help.

 

Re:Record Hidden after insert a new record


You're probably using a TQuery, so the current "set" needs to be
refreshed after an insert by doing a Query.Close followed by a
Query.Open.

Re:Record Hidden after insert a new record


John a crit :

Quote

> You're probably using a TQuery, so the current "set" needs to be
> refreshed after an insert by doing a Query.Close followed by a
> Query.Open.

I think Not !

Re:Record Hidden after insert a new record


Quote
"y.leroux" wrote:
> Hi,

> When i insert a new record with the help of a Dbnavigator
> The first one I insert is inserted as first record.
> After I insert a second record the first is hidden
> and can't access it by browsing with the DBnavigator.
> If i insert a Third the second is hidden etc...

> If i close the application then reopen it, all the record
> are displayed but they are shown at the end of the database.

> What's wrong ?

> Using : Win98,D3.02,Access 97 database with ODBC driver.

> Thanks to all repliers for their wise help.

Hi,

It seems to me that you use an autoincrement field in the acces table.
This type of field is not well managed by the ODBC. You can use a native
driver instead or don't use autoinc fields.

Regards,
Bogdan

Other Threads