Ver Mensaje Individual
  #3 (permalink)  
Antiguo 08/03/2006, 11:17
Avatar de a n g e l u s
a n g e l u s
 
Fecha de Ingreso: enero-2006
Ubicación: Chile
Mensajes: 237
Antigüedad: 19 años, 3 meses
Puntos: 1
EN REALIDAD LO QUE HACES NO ES CONVENIENTE, LA BUSQUEDA POR ID NO TE CONVIENE, TE SUGUIERO ALGUN NUMERO DE ASIGNACION O ALGO ASI, PERO AQUI ESTA TU RESPUESTA....

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>buscar</title>
<style type="text/css">
<!--
body,td,th {
color: #FFFFFF;
}
body {
background-color: #003333;
}
-->
</style></head>

<body>

<form name="form2" method="post" action="">
<div align="center">
<input type="submit" name="Submit" value="Buscar">
<input type="text" name="buscado">
</div>
</form>
<p>&nbsp;</p>

<hr>

<%
if request("buscado") <> "" then
dim conn
Set conn = Server.CreateObject("ADODB.Connection")
conn.ConnectionString ="driver=SQL Server;server=DESARROLLO;uid=prueba;pwd=prueba;dat abase=EXTERNA"
conn.Open

sql = "select * from prueba where id= "& request("buscado")
set rs = conn.execute(sql)

if not rs.eof then
%>
<form id="form1" name="form1" method="post" action="">
<label><br>
ID
<input type="text" name="txtid" value='<% =rs("id") %>'/>
</label>
<div align="left"></div>
<p align="left">NOMBRE
<input type="text" name="txtnombre" value='<% =rs("nombre") %>'/>
PUESTO
<input type="text" name="txtpuesto" value='<% =rs("puesto") %>'/>
AREA
<input type="text" name="txtarea" value='<% =rs("area") %>'/>
</p>
<p>TELEFONO
<input type="text" name="txttelefono" value='<% =rs("telefono") %>'/></p>
SUELDO
<input type="text" name="txtsueldo" value='<% =rs("sueldo") %>'/>
FECHA
<input type="text" name="txtfecha" value='<% =rs("fecha_ingreso") %>'/>
TURNO
<input type="text" name="txtturno" value='<% =rs("turno") %>'/>
</form>
<%
else
response.write "<center>Datos no encontrados</center>"
end if
else
response.write "<center>Ingrese un numero a buscar</center>"
end if
%>
</body>
</html>
__________________
Atte,
A n g e l u s
Concepción - Chile
más vale respuestas bien pensadas, que 7000 post