Ver Mensaje Individual
  #10 (permalink)  
Antiguo 03/08/2007, 11:51
Avatar de a n g e l u s
a n g e l u s
 
Fecha de Ingreso: enero-2006
Ubicación: Chile
Mensajes: 237
Antigüedad: 19 años, 3 meses
Puntos: 1
Re: Problemas con datos autonumericos

Tambien puedes usar el viejo y nunca bien ponderado truco de sql max()

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("<CENTER>ERROR AL BUSCAR EL ULTIMO REGISTRO<BR>:"&err.description&"-"&sql&"<hr></CENTER>")
else
if not rsmax.eof then
sqlmaximo = rsmax("maximo")
end if
rsmax.close
end if
End Function

espero que te sirva DE ALTERNATIVA.
__________________
Atte,
A n g e l u s
Concepción - Chile
más vale respuestas bien pensadas, que 7000 post