Código:
Esta muy bien para obtener, por ejemplo, la id de una tabla. Pero que pasaria si dos usuarios entrasen a la vez y obtendrian el mismo Id. Tengo entendido que en .NET hay alguna manera de controlar esto pero en ASP 3.0 no lo se. ¿Sabeis de alguna forma de controlarlo? Function GetMyMaxId(table, field)
Set rsGetMyMaxId = Server.CreateObject("ADODB.Recordset")
strSQLGetMyMaxId = "SELECT MAX(" & field & ") AS myMax FROM " & table
rsGetMyMaxId.Open strSQLGetMyMaxId, <B>ObjConn</B>, 3, 3
fnctMyMaxId = rsGetMyMaxId("myMax")
If IsNull(fnctMyMaxId) Then
fnctMyMaxId = 0
End If
rsGetMyMaxId.Close
Set rsGetMyMaxId = Nothing
GetMyMaxId = fnctMyMaxId
End Function

