Wrox Home  
Search P2P Archive for: Go

  Return to Index  

application_development thread: ASP won't show properly


Message #1 by "Marc Nascimento" <nascimento@r...> on Tue, 19 Feb 2002 21:47:15
OK, here's the situation. 



I created a news database with Microsoft Access, my frist page shows all 

the info the way I want it. Look at 



http://www.ditc-humber.com/summer2001/marcn/noid/



now when I click on one of the articles linked by the More Info... link 

it goes to a page that reads this error



--------------------------------------------------------------------------

The page cannot be displayed 

There is a problem with the page you are trying to reach and it cannot be 

displayed. 



--------------------------------------------------------------------------



Please try the following:



Open the www.ditc-humber.com home page, and then look for links to the 

information you want. 

Click the  Refresh button, or try again later.



Click  Search to look for information on the Internet. 

You can also see a list of related sites. 



HTTP 500 - Internal server error 

Internet Explorer  



--------------------------------------------------------------------------



Here is all the info from the first pages called Featured.asp



<%



' We connect to the recordset to get some information needed in this 

page. and assign them to common variables.



Dim featuredRS

Set featuredRS = Server.CreateObject("ADODB.Recordset")

featuredRS.ActiveConnection = Con

sqlString = "SELECT journal_id, journal_thumbnail, journal_name, 

journal_briefDesc " &_

            "FROM journals WHERE journal_featured=1 " &_

            "AND journal_status=1 " &_

            "ORDER BY journal_name"

featuredRS.Open sqlString

%> <font color="#336699"><b><font color="#666666">Our Featured 

Articles</font></b></font> 

<table border="0" cellpadding="10" cellspacing="0">

  <%count=0%>

  <%

  'a variable named count is made. 

  %>

  <tr> 

    <% WHILE NOT featuredRS.EOF %>

    <td> 

      <table align="center">

        <tr> 

          <td height="30" width="300"> <font color="#336699"><%=featuredRS

("journal_briefDesc")%></font> 

          </td>

        </tr>

        <tr> 

          <td height="25"><a href="journal.asp?jid=<%=featuredRS

("journal_id")%>"><font color="#000000">More 

            Info...</font></a></td>

        </tr>

      </table>

    <td>

	

	 <% 

	 'The code below takes the variable made earlier on the page 

(count) and adds 1 to it each time the code loops. When it

	 'reaches 4 it makes a break and the variable count is set back 

together. It will continue this pattern until 

	 'it finds nothing else to display from the database.

	 %>

	 

      <%  count=count+1

	if count=2 then

	response.write "</tr><tr>"

	count=0

	End if



featuredRS.MoveNext 

WEND

if count<>0 then

response.write "<tr></tr>"

end if

%>

      <div align="center"></div>

    <tr> 

</table>



--------------------------------------------------------------------------



Here's all the info for the journal.asp file (the one that I want to load)



<%

Dim ConnectString

journalID = Request("jid")



Set Con = Server.CreateObject( "ADODB.Connection" )



ConnectString= "Provider=Microsoft.Jet.OLEDB.4.0;" &_

         "Data Source=C:\Inetpub\ditc-humber\summer2001

\Marcn\db\NoID.mdb;" &_

          "Persist Security Info=False" 

         

Con.Open ConnectString    



sqlString = "SELECT * FROM journals "

sqlString = "sqlString & "WHERE journal_id=" & journalID

Set RS = Server.CreateObject( "ADODB.Recordset" )

RS.ActiveConnection = Con

RS.Open sqlString



cat = RS( "journal_category" )

%>



<html>

<head><title>No-ID <%=journalID%> Page</title></head>

<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" 

marginheight="0">

<center>

  <!-- #INCLUDE file="file:header.asp" -->

  <table border="0" width="100%" cellpadding="10" cellspacing="0" 

height="400">

    <tr> 

      <td valign="top" width="125" align="left" height="0"> 

        <!-- #INCLUDE file = "menuList.asp" -->

      </td>

	  

	  <!-- Here the product chosen is showing the picture for it, 

product name for it, description and price for it. -->

      

	  <td width="200" align="center"> <img src="<%=RS

("journal_picture")%>"></td>

      <td valign="top" width="*"> 

        <h2><%=cat%></h2>

        <h3><%=RS("journal_name")%></h3>

        <br>

        <%=RS("journal_fullDesc")%><br>

         

      </td>

    </tr>

  </table>

  <!-- #INCLUDE file="footer.asp" -->

</center>

   </body>

   </html>			



--------------------------------------------------------------------------



Any information would be greatly appreciated. All I want the thing to do 

is load a page with the footer, side and header along with the article 

kept in my Access file to be displayed in the main area. 



Thanks,



Marc Nascimento

nascimento@r...

  Return to Index