Solved

SSI

Posted on 2003-10-30
7
360 Views
Last Modified: 2010-04-06
Hey,
   I'm pretty new to asp but I'm working on a page that uses it and has two ADO connections. A friend of mine suggested that instead of putting the ADO code in the main page that I use a SSI, which I thought was great but then realized that I couldn't get it to work. Anyway here is what the code looks like.
<%
set conn=Server.CreateObject("ADODB.Connection")
conn.Provider="Microsoft.Jet.OLEDB.4.0"
conn.Open "C:\Inetpub\wwwroot\asp\Orders.mdb"
%>
<%
set rs=Server.CreateObject("ADODB.recordset")
rs.Open "Select [DEALER NAME], Address, CITY, STATE, Zip From [CURRENT ORDERS] WHERE ORIGIN='Z00'", conn
%>
<%
for each x in rs.Fields
      Response.Write(x.value & "<br />")
%>
      <%next%>

This is the file included with this string
<--!#include file="C:\Inetpub\wwwroot\asp\ADO\consignee.asp"-->

If anyone knows why this might not work I would appreciate any help.
0
Comment
Question by:Stratocaster
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
7 Comments
 
LVL 58

Accepted Solution

by:
Gary earned 125 total points
ID: 9655883
You shouldn't put the literal path in the include tag e.g.

If the include file is in the same folder
<--!#include file="consignee.asp"-->

If its in folders below the current folder prefix the folder path to the filename
<--!#include file="asp\ADO\consignee.asp"-->

If you want to go up a directory (and then down another folder path, ../ tells the server to go up one folder level
<--!#include virtual="../asp/ADO/consignee.asp"-->
0
 

Author Comment

by:Stratocaster
ID: 9658151
Gary,
   Thanks for the reply. I actually figured out after I posted this question that I didn't need the full pathname in the include but, since you had the right answer the points are yours.

Thanks again.

Stratocaster
0
 
LVL 58

Expert Comment

by:Gary
ID: 9658655
Glad you got it sorted but why the grade of B?
0
 

Author Comment

by:Stratocaster
ID: 9658707
Gary,
   Tha only reason I didn't post an A is because the A grade seemed to be for over-achievement like posting links to reference materials and that sort of thing. You got an A in my book though.

I really do appreciate the help Gary.

Thanks,
     Stratocaster.
0
 

Author Comment

by:Stratocaster
ID: 9670551
Lunchy,
     Thanks for the post. I do understand the grading policy.. in fact I re-read it right before I awarded a grade to this reply. I was however in a bit of a rush since I was at work while I was replying to this response. I do think that Gary should receive an A for his post. It did after all effectively answer the question I posted. I apologize to Gary for mis-grading his answer.


Thanks,
    Stratocaster
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
SEO friendly way to have two domains on website 9 96
how to extract window origin in spring 2 85
Grunt No Clean Targets 6 306
.php tree directory? 5 97
Article by: Matthew
I am a very big proponent of technology compliance standards and strive to meet such criteria in all of my work. That includes my site, which is 100% XHTML 1.0 compliant as determined by the World Wide Web Consortium. https://www.matthewstevenkel…
Browsers only know CSS so your awesome SASS code needs to be translated into normal CSS. Here I'll try to explain what you should aim for in order to take full advantage of SASS.
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question