Pagina 4 di 4 primaprima ... 2 3 4
Visualizzazione dei risultati da 31 a 34 su 34

Discussione: Aiuto per pagina asp

  1. #31
    Prova così:

    codice:
    <%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%> 
     
    <% 
    dim rs 
    dim rs2 
    dim cn 
    dim msg 
    
    set cn = Server.CreateObject("Adodb.Connection") 
    set rs = server.CreateObject("Adodb.Recordset") 
    
    cn.Open conn 
    
    sqlstring = "Select * From ProductCategories" 
    rs.open sqlstring, cn 
    
    
    %> 
    <html> 
    <head> 
    <title>ASP Product Catalog</title> 
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> 
    
    <link href="style.css" rel="stylesheet" type="text/css"> 
    <link href="images/style.css" rel="stylesheet" type="text/css"> 
    </head> 
    
    <body> 
    <div align="center"> 
    <table width="100%" border="0"> 
    <tr bgcolor="#FFFFCC"> 
    <td colspan="2"><div align="center"><font color="#000066" size="4" face="Georgia, Times New Roman, Times, serif">ASP 
    Product Catalog</font><font size="4" face="Georgia, Times New Roman, Times, serif">
     
    <font color="#0000FF" size="2">A very simple way to show your company 
    products online</font></font></div></td> 
    </tr> 
    <tr> 
    <td colspan="2" valign="top">Home <a href="#">About 
    us</a> Contact us</td> 
    </tr> 
    <tr> 
    <td width="16%" valign="top"><table width="100%" border="1"> 
    <tr> 
    <td><table width="100%" border="0"> 
    <tr> 
    <td bgcolor="#FFFFCC">Product Categories</td> 
    </tr> 
    <%if not rs.eof then 
    	while not rs.eof 
    		%> 
    		<tr> 
    		<td>"><%= rs("CategoryName")%></td> 
    		</tr> 
    		<% 
    		rs.movenext 
    	wend 
    end if 
    'Distrugge il primo recordset
    rs.close
    set rs = nothing
    %> 
    </table> 
    <form name="form1" method="post" action="search.asp"> 
    <input name="keywords" type="text" id="keywords" size="20"> 
    <input type="submit" name="Submit" value="Search"> 
    </form> 
    
    
     </p> 
    <table width="100%" border="0"> 
    <tr> 
    <td bgcolor="#FFFFCC"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Links</font></td> 
    </tr> 
    <tr> 
    <td><a href="http://www.sourcesystems.net" target="_blank">Source 
    Systems</a></td> 
    </tr> 
    <tr> 
    <td>w3code.com</td> 
    </tr> 
    <tr> 
    <td>w3update.com</td> 
    </tr> 
    <tr> 
    <td>jinnahsuper.com</td> 
    </tr> 
    </table> 
    
    
     </p></td> 
    </tr> 
    </table> 
    
    
     </p></td> 
    <td width="84%" valign="top"> <div align="left"> 
    
    Welcome to ASP Product 
    Catalog</p> 
    <%if not request.QueryString("cid")<>"" then%> 
    	<font color="#FF0000"> 
    	</font> 
    
    Welcome message is placed here.......</p> 
    <%end if%> 
    <% 
    if request.QueryString("cid") <> "" then 
    	sql = "Select * From Products Where CategoryID=" & request.QueryString("cid") & " order by price "
    	set rs2 = server.CreateObject("Adodb.Recordset") 
    	rs2.open sql, cn 
    end if 
    %> 
    <% 
    if not rs.eof then 
    	while not rs.eof 
    		%> 
    		<table width="100%" border="0"> 
    			<tr> 
    				<td bgcolor="#FFFFCC"><%=rs.fields("productname")%></td> 
    			</tr> 
    			<%if rs.fields("image") <> "" then%> 
    				<tr> 
    					<td height="20">[img]/public/images/products/<%=rs.fields([/img]" alt=""></td> 
    				</tr> 
    			<%end if%> 
    			<tr> 			
    				<td height="20"> <div align="right"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Price:<font color="#FF0000"> 
    				<%=rs.fields("price")%></font></font></div></td> 
    			</tr> 
    			<tr> 
    				<td><%=rs.fields("details")%></td> 
    			</tr> 
    		</table> 
    		
     
    		<% 
    		rs.movenext 
    	wend 
    else 
    	'response.Write("No products") 
    end if 
    %> 
    
    
     </p> 
    
    
    [img]images/banner1.jpg[/img]</p></td> 
    </tr> 
    <tr bgcolor="#FFFFCC"> 
    <td colspan="2" valign="top"><div align="center"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Powered 
    by ASP Product Catalog - A project of <a href="Source%20Systems" target="_blank">Source 
    Systems</a></font></div></td> 
    </tr> 
    </table> 
    </div> 
    </body> 
    </html>
    Provare paura per un qualcosa che ti possa capitare nel futuro non ti evita quell'evento,ti fa soltanto vivere un presente sbagliato!

  2. #32
    Questo è l'errore che mi da:

    Welcome to ASP Product Catalog

    Microsoft VBScript runtime error '800a01a8'

    Object required

    /catalog/default.asp, line 104

  3. #33
    Prova a sostituire la tua riga con questa:

    set rs = cn.execute("Select * From Products Where CategoryID=" & request.QueryString("cid") & " order by price ")

    Dovrebbe essere la tua riga 93, se non sbaglio
    Per sicurezza ti posto tutta la pagina:

    codice:
    <%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%> 
     
    <% 
    dim rs 
    dim rs2 
    dim cn 
    dim msg 
    
    set cn = Server.CreateObject("Adodb.Connection") 
    set rs = server.CreateObject("Adodb.Recordset") 
    cn.Open conn 
    sqlstring = "Select * From ProductCategories" 
    rs.open sqlstring, cn 
    
    
    %> 
    <html> 
    <head> 
    <title>ASP Product Catalog</title> 
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> 
    
    <link href="style.css" rel="stylesheet" type="text/css"> 
    <link href="images/style.css" rel="stylesheet" type="text/css"> 
    </head> 
    
    <body> 
    <div align="center"> 
    <table width="100%" border="0"> 
    <tr bgcolor="#FFFFCC"> 
    <td colspan="2"><div align="center"><font color="#000066" size="4" face="Georgia, Times New Roman, Times, serif">ASP 
    Product Catalog</font><font size="4" face="Georgia, Times New Roman, Times, serif">
     
    <font color="#0000FF" size="2">A very simple way to show your company 
    products online</font></font></div></td> 
    </tr> 
    <tr> 
    <td colspan="2" valign="top">Home <a href="#">About 
    us</a> Contact us</td> 
    </tr> 
    <tr> 
    <td width="16%" valign="top"><table width="100%" border="1"> 
    <tr> 
    <td><table width="100%" border="0"> 
    <tr> 
    <td bgcolor="#FFFFCC">Product Categories</td> 
    </tr> 
    <%if not rs.eof then 
    while not rs.eof 
    %> 
    <tr> 
    <td>"><%= rs("CategoryName")%></td> 
    </tr> 
    <% 
    rs.movenext 
    wend 
    end if 
    %> 
    </table> 
    <form name="form1" method="post" action="search.asp"> 
    <input name="keywords" type="text" id="keywords" size="20"> 
    <input type="submit" name="Submit" value="Search"> 
    </form> 
    
    
     </p> 
    <table width="100%" border="0"> 
    <tr> 
    <td bgcolor="#FFFFCC"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Links</font></td> 
    </tr> 
    <tr> 
    <td><a href="http://www.sourcesystems.net" target="_blank">Source 
    Systems</a></td> 
    </tr> 
    <tr> 
    <td>w3code.com</td> 
    </tr> 
    <tr> 
    <td>w3update.com</td> 
    </tr> 
    <tr> 
    <td>jinnahsuper.com</td> 
    </tr> 
    </table> 
    
    
     </p></td> 
    </tr> 
    </table> 
    
    
     </p></td> 
    <td width="84%" valign="top"> <div align="left"> 
    
    Welcome to ASP Product 
    Catalog</p> 
    <font color="#FF0000"> 
    <%if not request.QueryString("cid")<>"" then%> 
    </font> 
    
    Welcome message is placed here.......</p> 
    <%end if%> 
    <% 
    if request.QueryString("cid")<>"" then 
    	  set rs = cn.execute("Select * From Products Where CategoryID=" & request.QueryString("cid") & " order by price ")
    end if 
    %> 
    <% 
    if not rs.eof then 
    while not rs.eof 
    %> 
    <table width="100%" border="0"> 
    <tr> 
    <td bgcolor="#FFFFCC"><%=rs.fields("productname")%></td> 
    </tr> 
    <%if rs.fields("image")<>"" then%> 
    <tr> 
    <td height="20">[img]images/products/<%=rs.fields([/img]" alt=""></td> 
    </tr> 
    <tr> 
    <%end if%> 
    <td height="20"> <div align="right"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Price:<font color="#FF0000"> 
    <%=rs.fields("price")%></font></font></div></td> 
    </tr> 
    <tr> 
    <td><%=rs.fields("details")%></td> 
    </tr> 
    </table> 
    
     
    <% 
    rs.movenext 
    wend 
    else 
    'response.Write("No products") 
    end if 
    %> 
    
    
     </p> 
    
    
    [img]images/banner1.jpg[/img]</p></td> 
    </tr> 
    <tr bgcolor="#FFFFCC"> 
    <td colspan="2" valign="top"><div align="center"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Powered 
    by ASP Product Catalog - A project of <a href="Source%20Systems" target="_blank">Source 
    Systems</a></font></div></td> 
    </tr> 
    </table> 
    </div> 
    </body> 
    </html>
    E come ha detto Roby ... Un po' di impegno...

  4. #34
    garzie sei stato fantastico, funziona tutto ok!

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2026 vBulletin Solutions, Inc. All rights reserved.