Ver Mensaje Individual
  #2 (permalink)  
Antiguo 21/06/2002, 02:38
Avatar de TomaHawkk
TomaHawkk
 
Fecha de Ingreso: diciembre-2001
Ubicación: España
Mensajes: 422
Antigüedad: 23 años, 5 meses
Puntos: 1
Re: La segunda parte de la pregunta modificar los dato

Hola!

He modificado algunas cosillas espero que te sirva:

Código:
 
<html>

<head>
<title>Modificar datos entrada</title>
</head>
<body>
<%'Abre la conexion con la base de datos a traves de una conexion ODBC
Set con = Server.CreateObject("ADODB.Connection")
con.Open("DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("\jpalbox\db\usuarios.mdb"))

SQL="Select * from Personal where usuario='jpalbox'"
SET rs = con.execute(SQL)
If rs.EOF then
response.write "no exite el usuario"
else 
%>
<div align="center"><center>

<table width="339">
<tr>
<td width="251">Nombre:<input type="text" name="nombre" size="20"
VALUE="<%=Rs("nombre")%>" readonly></td>
<td width="80"><%=Rs("password") %>
</td>
</tr>
</table>
</center></div>

<%

'sin esta parte de la actualizacion funciona.

'Ejecuta un sentencia SQL para insertar alta
sql = "UPDATE Personal SET nombre ='" & nombre & "' where usuario='jpalbox'" 
con.Execute(sql)

If Err.number > 0 Then
	Response.write "Se ha producido un error"
Else
	'Insercion correcta
	Response.write "Modificacion correcta"
End If
%>

<%
end if

rs.Close
set rs = nothing
con.Close
Set con = Nothing
%>
</body>
</html>
Saludos.