Ver Mensaje Individual
  #28 (permalink)  
Antiguo 11/01/2006, 15:56
Avatar de JuanRAPerez
JuanRAPerez
Colaborador
 
Fecha de Ingreso: octubre-2003
Mensajes: 2.393
Antigüedad: 21 años, 7 meses
Puntos: 27
Depurado y con un comentario espero te sirva

Cosas que modificaras en negrita, tenes que re ordenar las formas

<%
select case request("mostrar")
case ""
%>


<form name="form2" method="post" action="busca_cel.asp">
<table width="190" border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
<br>
Buscar por Telefono Celular: <br>
<br>
<font color="#FFFFFF" >
<input name="telefono2" type="text" onBlur="MM_validateForm('telefono2','','RisNum');r eturn document.MM_returnValue" size="15" maxlength="11">
<br> <br>
<input type="hidden" name="detalle" value="perfil">
<input type="submit" name="enviar2" value="Buscar">
<a href="index.asp">&lt;&lt;&lt; Volver al Home</a></td>
</tr>
</table>
</form>

<%
case "detalle "

Set Con = Server.CreateObject ("ADODB.Connection")
Con.Open "driver={SQL Server};server=website; database=clubin; uid=sa;pwd=sa"
%>

<%

case "perfil"
if request.form("telefono2") <> "" then
sql="SELECT UploadDT, nombre, alias, sexo, edad, telefono2, ciudad, hobbies, cuadre, SourceFileName FROM curriculumv WHERE telefono2.curriculumv = '"&telefono2&"'"
else
' no entiendo porque haces esto
sql="SELECT UploadDT, nombre, alias, sexo, edad, telefono2, ciudad, hobbies, cuadre, SourceFileName FROM curriculumv"
end if
set rs = con.Execute(sql)
%>




<table width="99%" height="84%" border="0" cellpadding="1" cellspacing="1" >





<tr>
<td width="2%" height="329" ><br>
</td>
<td width="98%" valign="top">
<%
'COMENTARAIO JUANRA
'si el celular solo puede tenerlo un unico usuario porque haces un do while?????
'yo quitaria este do while y pondria una validacion
'Si RS ES fin de archivo si esta vacio
'diga que no hay registros en la base de datos con ese celula
'si hay solo muestrelo con todo lo de abajo menos el do while
'ni el RS.MoveNext(), ni Loop


Do while not RS.EOF %>

<table width="100%" height="181" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="181" valign="top"><table width="100%" height="218" border="0" cellpadding="2" cellspacing="3">
<tr>
<td width="92" rowspan="5" align="center" valign="middle"><div align="left"></div>

<div align="center"><img src="<%= RS("SourceFileName")%>" width="90" height="120"></div></td>
<td width="265" height="24" colspan="2" ><div align="left">
Fecha:
<%= RS("UploadDT")%>
</div>
<div align="center"></div></td>
</tr>
<tr >
<td height="24" colspan="2"><div align="left">
Nombre: <%= RS("nombre")%></div></td>
</tr>
<tr >
<td height="24" colspan="2" >Alias:
<%= RS("alias")%></td>
</tr>
<tr >
<td height="24" colspan="2" ><div align="left">Edad:
<%= RS("edad")%> a&ntilde;os</div></td>
</tr>
<tr >
<td height="24" colspan="2">Sexo:
<%= RS("sexo")%>
</td>
</tr>
<tr>
<td height="4" colspan="3">Telefono
(Cel):
<%= RS("telefono2")%></td>
</tr>
<tr>
<td height="4" colspan="3">Ciudad:
<%= RS("ciudad")%></td>
</tr>
<tr>
<td height="9" colspan="3">Hobbies:
<%= RS("hobbies")%></td>
</tr>
<tr>
<td height="21" colspan="3">Cuadre
Perfecto :
<%= RS("cuadre")%></td>
</tr>
</table></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="3" cellpadding="3">
<tr>
<td><div align="center"></div></td>
</tr>
</table>
<hr>
<%
RS.MoveNext()
Loop
%>
</td>
</tr>
</table>

<%
end select
%>
__________________
JuanRa Pérez
San Salvador, El Salvador