
10/02/2005, 05:20
|
| | Fecha de Ingreso: mayo-2003
Mensajes: 866
Antigüedad: 22 años Puntos: 0 | |
Muzztein gracias por tu ayuda, obtengo este error:
Tipo de error:
ADODB.Recordset (0x800A0BB9)
Argumentos incorrectos, fuera del intervalo permitido o en conflicto con otros.
/webgs/admin/test1.asp, línea 12 ¿Puede ser debido a las constantes de la conexion 3,3?
Nota: y luego la capturas con un split por coma...
Esto no lo necesitaria porque lo unico que quiero obtener es el idproducto,
mira que he puesto: fnctMyMaxId =rsGetMyMaxId("PK")
y no
fnctMyMaxId = rsGetMyMaxId("myMax") & "," & rsGetMyMaxId("PK")
<%
Function GetMyMaxId(autonumerico,table, field)
Set rsGetMyMaxId = Server.CreateObject("ADODB.Recordset")
strSQLGetMyMaxId = "SELECT MAX(" & field & ") AS myMax , "& autonumerico &" as PK FROM " & table
'Response.Write(strSQLGetMyMaxId)
'Response.End() rsGetMyMaxId.Open strSQLGetMyMaxId, ObjConn, 3, 3
fnctMyMaxId =rsGetMyMaxId("PK")
If IsNull(fnctMyMaxId) Then
fnctMyMaxId = false
End If
rsGetMyMaxId.Close
Set rsGetMyMaxId = Nothing
GetMyMaxId = fnctMyMaxId
End Function
%>
<%=GetMyMaxId("idproducto","productos", "lecturas") %>
Última edición por sqa212; 10/02/2005 a las 05:23 |