FUNCION PARA BUSCAR EL ULTIMO REGISTRO INGRESADO EN LA BD, BASTANTE UTIL
ASI SE LLAMA
ultimodato = sqlmaximo(campo, tabla)
campo = corresponde autonumerico
tabla = tabla que buscas el ultimo registro ingresado
ESTA ES LA FUNCION
Function sqlmaximo( campo, tabla )
on error resume next
sql = "select max("&campo&") as maximo from "&tabla
set rsmax = db.execute(sql)
if err <> 0 then
Response.Write("ERROR :"&err.description&"<hr>")
else
if not rsmax.eof then
sqlmaximo = rsmax("maximo")
end if
rsmax.close
End Function
__________________
Atte,
A n g e l u s