?
=?ISO-8859-15?Q?Christian_M=FCnscher?=
Hi!
A friend of mine has to cope with an Access 2.0 Database. Sometimes
there is a weird problem that makes it necessary to determine what is
the ID of the last record that has been created in a table.
In MySQL, I'd use "mysql_last_id" or try to get that ID by using the SQL
"MAX" function, assuming that the ID always is incremented.
For example, you could use "SELECT MAX(salary) as 'Highest salary'
FROM employees;" to identify the highest salary, or do a "SELECT MAX(ID)
FROM data;" to solve my problem in MySQL.
How would you do that in Access 2.0? And how would you close the "gap"
if the ID accidentally has been incremented by two (three, four) instead
of one? I think one would have to rewrite the whole table if absolutely
wanting to close that gap. Its an old 16-bit version of Visual Basic
(4.0?) his programs are coded in... Is there something like a (coding)
reference manual online for Access 2.0? Googling around didn't help me ;(
Thank you very much!
With kind regards,
Chriss
A friend of mine has to cope with an Access 2.0 Database. Sometimes
there is a weird problem that makes it necessary to determine what is
the ID of the last record that has been created in a table.
In MySQL, I'd use "mysql_last_id" or try to get that ID by using the SQL
"MAX" function, assuming that the ID always is incremented.
For example, you could use "SELECT MAX(salary) as 'Highest salary'
FROM employees;" to identify the highest salary, or do a "SELECT MAX(ID)
FROM data;" to solve my problem in MySQL.
How would you do that in Access 2.0? And how would you close the "gap"
if the ID accidentally has been incremented by two (three, four) instead
of one? I think one would have to rewrite the whole table if absolutely
wanting to close that gap. Its an old 16-bit version of Visual Basic
(4.0?) his programs are coded in... Is there something like a (coding)
reference manual online for Access 2.0? Googling around didn't help me ;(
Thank you very much!
With kind regards,
Chriss