Ver Mensaje Individual
  #19 (permalink)  
Antiguo 10/08/2002, 23:22
rashid
 
Fecha de Ingreso: enero-2002
Ubicación: Perez Zeledon Costa Rica
Mensajes: 1.009
Antigüedad: 23 años, 4 meses
Puntos: 11
Re: El IIS debo iniciarlo? o inicia solo.

No Sirve:
<!--#include file="Conection.asp"-->
<!-- #include file="auctionlib.asp" -->
<%
Call DoPageHeader
Call OpenDBConn
sSQL = ""
sSQL = sSQL & "SELECT * FROM Categories"
set rs = GobjConnect.Execute(sSQL)
%>
<TABLE WIDTH="550" BORDER="2" CELLSPACING="0" CELLPADDING="3">
<TR >
<TD COLSPAN="2"></TD>
</TR>
<%If rs.eof then%>
<TR >
<TD COLSPAN="2" >No Categories</TD>
</TR>
<%Else
TwoCols = True
Do While Not rs.eof%>
<TR>
<TD width = "50%" bgcolor="#996600"><BIG><BIG& gt; <A HREF=viewsales1.asp?catID=<%= rs.Fields("ID") %> ><%= rs.Fields("CategoryName") %></A></BIG> ( <%= CountItems(rs.Fields("ID"))%> )</BIG> <BR>
</TD>
<%rs.MoveNext
If rs.eof Then%>
<TD > </TD>
</TR>
<%Else%>
<TD width = "50%" bgcolor="#996600"><BIG><BIG& gt; <A HREF=viewsales1.asp?catID=<%= rs.Fields("ID")%> ><%= rs.Fields("CategoryName") %></A></BIG> (<%= CountItems(rs.Fields("ID"))%> )</BIG> <BR>
</TD>
</TR>
<%rs.MoveNext
End If
Loop
rs.Close
End If
%>
</TABLE>
<p>
<%
Function CountItems(ID)
CountSQL = ""
CountSQL = CountSQL & " SELECT COUNT(*) AS total FROM Auctions WHERE "
CountSQL = CountSQL & " AvailDate <= " & SQLDate(NOW)
CountSQL = CountSQL & " And Ended = false "
CountSQL = CountSQL & " And CategoryID = " & SQLVal(ID)
Set CountRS = GobjConnect.Execute(CountSQL)
CountItems = CountRS.Fields("total")
CountRS.Close
Set CountRS = Nothing
End Function
%>
</p>
<%
Call DoPageFooter
Call CloseDBConn
Sub GetCategories
sSQL = ""
sSQL = sSQL & "SELECT * FROM Categories ORDER BY CategoryName "
Set rs = GobjConnect.Execute(sSQL)

If rs.eof Then
Response.Write("<OPTION VALUE=""0"">No Categories</OPTION>")
Else
Do While Not rs.eof
Response.Write("<OPTION VALUE=""" & rs.Fields("ID")&"""&g t;")
Response.Write rs.Fields("CategoryName")
Response.Write("</OPTION>")
rs.MoveNext
Loop
End If
rs.Close
Set rs = Nothing
End Sub
%>