Ver Mensaje Individual
  #13 (permalink)  
Antiguo 08/01/2006, 20:51
Avatar de blogger
blogger
 
Fecha de Ingreso: diciembre-2005
Ubicación: frente al monitor
Mensajes: 398
Antigüedad: 19 años, 5 meses
Puntos: 12
ingreso.asp

<%@ Language="VBScript" %>
<html>
<head>
<title>Ingreso de Datos</title>
</head>

'Iniciamos la conexion a la base de datos

<%
Dim Conexion,Tabla
Set Conexion = Server.CreateObject("ADODB.Connection")
Set Tabla = Server.CreateObject("ADODB.Recordset")

Conexion.Open "Driver={Microsoft Access Driver (*.mdb)}; " & "Dbq=" & Server.MapPath("base.mdb")

Dim Temp

Temp="Select * From Tabla1 Where UCase(Nombre)='" & UCase(Request("Dato1")) & "' And UCase(Des)='" & UCase(Request("Dato2")) & "' And UCase(Pal)='" & UCase(Request("Dato3")) &"'"
Tabla.Open Temp,Conexion,2,3,1

If Tabla.BOF And Tabla.EOF Then
Tabla.AddNew
Tabla("Nombre") = Request("Dato1")
Tabla("des") = Request("Dato2")
Tabla("Pal") = Request("Dato3")
Tabla.Update

%>

'Si no existe el registro presentamos el siguiente mensaje

<font face="Tahoma" size="2"><b><i>Ingreso de datos completado</i></b></font></p>

<%

'Pero si ya es un registro repetido presentamos este mensaje

Else
Response.Write "El registro ya existe"
End If

Tabla.Close
Conexion.Close
%>

<p align="center"><font face="Tahoma" size="2"><b><i><a href="cargar.asp" target="_top">Ingresar
Nuevo</a></i></b></font></p>
</body>
</html>
__________________
http://exegesis-biblica.com/