Informations Marciac
|
Posted: 04/30/2001, 1:26 AM |
|
I need to generate a field in database Access to know the record number (ID
auto) when I'm in Insert mode !
Is somebody can tell me how to find the last record number inserted in this
table or something equivalent. ( without counting all records)
Thanks for your answer.
|
|
|
Alexey Alexapolsky
|
Posted: 05/02/2001, 2:05 AM |
|
If your record ID is autoincremented you may just execute query "select
max(id) from table"
--
Regards,
Alexey
CodeCharge Support
Informations Marciac <info@marciac.net> wrote in message
news:9cj7jf$odc$1@mail.tankhill.com...
> I need to generate a field in database Access to know the record number
(ID
> auto) when I'm in Insert mode !
> Is somebody can tell me how to find the last record number inserted in
this
> table or something equivalent. ( without counting all records)
> Thanks for your answer.
>
>
>
|
|
|
Adam Marash
|
Posted: 05/02/2001, 5:37 AM |
|
This sounds dangerous if there is more than one user inserting data at the
same time.
"Alexey Alexapolsky" <alexa@codecharge.com> wrote in message
news:9coikm$2qj$1@mail.tankhill.com...
> If your record ID is autoincremented you may just execute query "select
> max(id) from table"
>
> --
> Regards,
> Alexey
> CodeCharge Support
|
|
|
Alexey Alexapolsky
|
Posted: 05/03/2001, 2:00 AM |
|
Well , then you have to implement either your own or your db's way
of record locking or similar. For instance you could add some prefix to your
id , so that you could differ records inserted by different people by
prefixes ,
even "select max(id) from table where inserter_id=n" would help , if this
table contains
some info about who inserts records.
--
Regards,
Alexey
CodeCharge Support
Adam Marash <faxman @ altavista.net> wrote in message
news:9cov1k$qil$1@mail.tankhill.com...
> This sounds dangerous if there is more than one user inserting data at the
> same time.
>
>
>
>
> "Alexey Alexapolsky" <alexa@codecharge.com> wrote in message
>news:9coikm$2qj$1@mail.tankhill.com...
> > If your record ID is autoincremented you may just execute query "select
> > max(id) from table"
> >
> > --
> > Regards,
> > Alexey
> > CodeCharge Support
>
>
>
|
|
|
|