CodeCharge Studio
search Register Login  

Web Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> Archive -> CodeCharge.Discussion

 ASP : How to find last record number ?

Print topic Send  topic

Author Message
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
>
>
>


   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.