Ver Mensaje Individual
  #4 (permalink)  
Antiguo 02/06/2003, 10:25
rrufo
 
Fecha de Ingreso: enero-2002
Mensajes: 1.438
Antigüedad: 22 años, 10 meses
Puntos: 0
MI UTILIZAS ACCESS HAS EL INSET DE ESTA FORMA:

<%
' *** Insert Record: ...

If (CStr(Request("MM_insertAuto")) <> "") Then


If (Not MM_abortEdit) Then
'Execute the insert
'Retrieve record (assume a 1-1 relationship)
Set MM_rs = Server.CreateObject("ADODB.Recordset")
MM_rs.ActiveConnection = MM_editConnection
MM_rs.Source = "SELECT * FROM " & MM_editTable
MM_rs.CursorType = 1
MM_rs.CursorLocation = 2
MM_rs.LockType = 3
MM_rs.Open()
MM_rs_numRows = 0


MM_rs.AddNew

' Fill in the fields on the form
Dim varTemp
For i = LBound(MM_fields) To UBound(MM_fields) Step 2
varTemp = MM_fields(i+1)
If (varTemp <> "NULL") And (varTemp <> "") Then
MM_rs.Fields(MM_columns(i)).value = varTemp
End if
Next

MM_rs.Update
MM_rs.MoveLast
MM_AutoNum = MM_rs.Fields(MM_editColumn).value
MM_rs.Close


If (MM_editRedirectUrl <> "") Then
Response.Redirect(MM_editRedirectUrl)
End If
End If

End If
%>