getting last record in access db

M

Mark

I'm using ASP.Net to accress a database, what I need to do is get the fields
out of the very last record in the db.
How do I do this?
Actually I'm after the primary key, titled 'AdID' it'll tell me what number
this last record is. so I can tell what number the next record inserted will
be.

How do I do this?

Thanks,

Mark
 
M

Mark

I'm reading it.. and I'll try it, but this is an access db, and yes, it will
be growing from day to day.

Will this work with an access db?
 
C

Chris Botha

Sorry, by "are they growing" I meant are the IDs sequential, like
AutoNumbers, then the
"Select MAX(AdID) from MyTableName" should give you the ID of the last
record inserted.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top