Include Files

Results 1 to 4 of 4

Thread: Include Files

  1. #1
    Steven E. Guest

    Default Include Files

    Why is it that my ASP pages fail to completely load as soon as my include file has finished?<BR><BR>I get NO errors I just get everything up to the point where my Include file (another asp file)ends.<BR><BR>The include.asp file contains a connection to the same dB that the original ASP file connects to.<BR><BR>Any Ideas would be greatly appreciated. I&#039ll post some of the code if requested.<BR><BR>§èè ¥ä!<BR>Steven E.<BR>

  2. #2
    shaffer Guest

    Default RE: Include Files

    can you post code?

  3. #3
    Steven E Guest

    Default RE: Include Files

    Here is the Included file code<BR>*******************************<BR><BR>&#0 60;%<BR> sub BanDisplay()<BR><BR> &#039Define our ADO constants<BR> const adOpenStatic = 3<BR> const adLockOptimistic = 3<BR><BR> &#039----- Create and Open Connection<BR> Set MyConnection = Server.CreateObject("ADODB.Connection")<BR>MyConne ction.ConnectionString = "Provider=Microsoft.Jet.OLEDB.3.51;Data Source=c:inetpubwwwroota
    wbo.mdb" <BR>&#039MyConnection.ConnectionString = "Provider=Microsoft.Jet.OLEDB.3.51;Data Source=D:Webs
    wbo.mdb" <BR><BR> <BR> MyConnection.Open<BR><BR> &#039----- Pick Ad from database<BR> SQLBanners = "Select * from Clients Where Active=True "<BR> Set Banners = Server.CreateObject("ADODB.Recordset")<BR> Banners.CursorType = adOpenStatic<BR> Banners.LockType = adLockOptimistic<BR> Banners.Open SQLBanners, MyConnection<BR><BR> Randomize Timer<BR> Banners.Move Int(RND * CInt(Banners.RecordCount))<BR> &#039Response.write Int(RND * CInt(Banners.RecordCount)) & "<BR><BR>"<BR> <BR> &#039----- Increment Shown field value<BR> If Banners("Shown") = "" Then<BR> Banners("Shown") = "0"<BR> Banners.Update<BR> End If<BR> <BR> Banners("Shown") = Banners("Shown") + 1<BR> Response.write Banners("Shown") <BR> Banners.Update<BR><BR> &#039----- Create and display Response<BR> ImageString = "&#060;img border=0 src=""" & Banners("banner") & """ alt=""" & Banners("ClientName") & """&#062;"<BR> ResponseString = "&#060;a href=""RedirectMe.asp?URL=../fullpage/" & Banners("Fullpage")<BR> ResponseString = ResponseString & "&BannerID=" & Banners("CID") & """&#062;" & ImageString & "&#060;/a&#062;"<BR> Response.Write ResponseString<BR> Response.End<BR><BR> &#039----- Clean up memory<BR> Banners.Close<BR> MyConnection.Close<BR> Set Banners=Nothing<BR> Set MyConnection=Nothing<BR><BR>end sub<BR><BR>*************************************** *******<BR><BR>The above code is inserted on a page thatlooks like this code wise:<BR><BR>&#060;td width="470" valign="top"&#062;&#060;p align="center"&#062;&#060;% BanDisplay %&#062;&#060;/td&#062;<BR><BR>Above this line there is another dB connection calling data from the dB to fill the rest of the page.<BR><BR>everything up to and including this last line is executed. what follows that line is not executed.<BR><BR>Hope this helps<BR>Thanks<BR>Steve<BR>

  4. #4
    Steven E. Guest

    Default RE: Include Files

    Found it!<BR><BR>Response.End is the culprit.<BR><BR>Thanks to all who helped!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts