Ver Mensaje Individual
  #11 (permalink)  
Antiguo 01/10/2010, 10:01
ncianc
 
Fecha de Ingreso: julio-2010
Mensajes: 35
Antigüedad: 14 años, 6 meses
Puntos: 0
Respuesta: Busqueda Multiple en .asp

No, vengo trabajando desde hace unos meses, pero no le busco la vuelta para las busquedas...

Hasta aora solo podia hacer busqueda de a un campo no de a varios.

<HTML>
<TITLE> Search Plan Status information </TITLE>
<body bgcolor="#FFFFFF" bgproperties="fixed" background="ibmbackgroundsuave.jpg">
<p style="margin-top: 0; margin-bottom: 0">
<img SRC="ServiceManagement.bmp" width="600" height="95"> </p>
&nbsp; </p>
<table width="100%" align=left>
<td width="50%" align=right>
<table align="left">
<td align="left">
<p style="margin-top: 0; margin-bottom: 0">&nbsp;
<a href="http://www.forosdelweb.com/f15/PlanManagementTool/Default.htm"><font color="#000000">Home</font></a>
<font color="#000000"> | </font>
<a target="_top" href="search.htm"><font color="#000000">Plan Status Search</font></a>
<font color="#000000"> | </font>
</p>
</td>
</tr>
</table>
</td>
</tr>
</table>
<p style="margin-top: 0; margin-bottom: 0">
</p>
<br>
</p>
<hr>

<%
poo = Request.Form ("texto")
sta = Request.Form ("nombre")

If(poo <>"" and sta <>"") then
Sql2 = sql2 & "WHERE Status LIKE '%" & sta & "%' and Pool LIKE '%" & poo & "%' "
end if

dbfile=Server.MapPath("fpdb/ticketsgenerales.mdb")
Set OBJdbConnection=Server.CreateObject("ADODB.Connect ion")
OBJdbConnection.Open "driver={Microsoft Access Driver (*.mdb)};dbq="&dbfile
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open Sql2 , OBJdbConnection, 3, 3 %>

<CENTER>

<TABLE BORDER=1>
<TR>
<tr bgcolor= "#990000">
<TH><font color="#FFFFFF">Clave</font></TH>
<TH><font color="#FFFFFF">Manager Approval</font></TH>
<TH><font color="#FFFFFF">Category</font></TH>
<TH><font color="#FFFFFF">Priority</font></TH>
<TH><font color="#FFFFFF">Description</font></TH>
<TH><font color="#FFFFFF">Pool</font></TH>
<TH><font color="#FFFFFF">OwnerTrainer</font></TH>
<TH><font color="#FFFFFF">AssociateTrainee</font></TH>
<TH><font color="#FFFFFF">DueDate</font></TH>
<TH><font color="#FFFFFF">StartDate</font></TH>
<TH><font color="#FFFFFF">DateCompleted</font></TH>
<TH><font color="#FFFFFF">AdditionalComments</font></TH>
<TH><font color="#FFFFFF">Status</font></TH>

<% DO UNTIL rs.Eof %>
<TR>

<TD><b><CENTER><font face="Verdana" size="2"> <%= rs("Clave") %> </CENTER></b></TD>
<TD><b><CENTER><font face="Verdana" size="2"> <%= rs("ManagerApproval") %> </CENTER></b></TD>
<TD><b><CENTER><font face="Verdana" size="2"> <%= rs("Category") %> </CENTER></b></TD>
<TD><b><CENTER><font face="Verdana" size="2"> <%= rs("Priority") %> </CENTER></b></TD>
<TD><b><CENTER><font face="Verdana" size="2"> <%= rs("Description") %> </CENTER></b></TD>
<TD><b><CENTER><font face="Verdana" size="2"> <%= rs("Pool") %> </CENTER></b></TD>
<TD><b><CENTER><font face="Verdana" size="2"> <%= rs("OwnerTrainer") %> </CENTER></b></TD>
<TD><b><CENTER><font face="Verdana" size="2"> <%= rs("AssociateTrainee") %> </CENTER></b></TD>
<TD><b><CENTER><font face="Verdana" size="2"> <%= rs("DueDate") %> </CENTER></b></TD>
<TD><b><CENTER><font face="Verdana" size="2"> <%= rs("StartDate") %> </CENTER></b></TD>
<TD><b><CENTER><font face="Verdana" size="2"> <%= rs("DateCompleted") %> </CENTER></b></TD>
<TD><b><CENTER><font face="Verdana" size="2"> <%= rs("AdditionalComments") %> </CENTER></b></TD>
<TD><b><CENTER><font face="Verdana" size="2"> <%= rs("Status") %> </CENTER></b></TD>

<% rs.MoveNext
LOOP
set rs = Nothing
OBJdbConnection.Close
set OBJdbConnection = Nothing%>


</TABLE>

&nbsp;
<table width="84%" align="left">
<tr>
<td width="50%" align="right">
<table align="left">
<tr>
<td align="center">
</FORM>
<table width="100%" align="left">
<td width="50%" align="right">
<table align="left">
<td align="left">

</p>
</td>
</tr>
</table>
</td>
</tr>
</table>
<p>
</BODY>
</HTML>

Este es todo el script