[AccessD] X-Posted: AccessD / dba-Tech : ASP

Jim Lawrence (AccessD) accessd at shaw.ca
Sun Dec 21 10:21:38 CST 2003


Hi Andrew:

Your problem is not with getting the <!--#include file="MyFile.txt" -->
statement working but with getting ASP working?

My web server is a Windows2000 advanced server. When I installed it along
with the IIS web server I guess the system automatically installed ASP and
configured it appropriately...it is a MS product after all. Since then I
have also installed PHP, JSP, Perl and CFM; and yes they have to be setup
(pointed towards their parser) or the system will not recognize the inline
symbols. Do you have a server at your disposal?... Some languages can be
setup to run on any station..i.e. I have Perl running on my W98 box...DOS on
steroids. You can also run an Apache server on a station with only 256MB of
RAM, a friend did all his coding work there. Not that I would recommend it.

My forte is in PHP, JavaScript, CSS and trying to learn .Net; Drew Wutka is
the list expert in ASP and would be the ideal person to answer your specific
questions. I have not seen his name popup on the site for a week so I
suspect he is on holidays. (away from the computer) He can be reached
through the DBA site as he is on the board of directors. See:
http://www.databaseadvisors.com/contacts.htm

HTH
Jim

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Haslett,
Andrew
Sent: Saturday, December 20, 2003 11:37 PM
To: 'Access Developers discussion and problem solving'
Subject: RE: [AccessD] X-Posted: AccessD / dba-Tech : ASP


 Hi Jim,

Yep, wasn't getting at the having the web server running, but getting the
correct dll to parse the asp section of the file.

Are you saying that if you specify an <include> directive in a .html page,
and the included file contains ASP code (such as the time.incl file you
used), that it knows to send that code to the asp parser simply because of
the <%%> tags?

I can't see how that would work without configuring your web-server to send
*.incl files to the asp engine, but I'll give it a try.

AFAIK, the <% %> tags are only recognised by the ASP parser, from *within* a
.asp page.  (ie. An extension configured to be parsed to the asp parser)
This allows the coder to escape his asp code from HTML code.

The w3 example is a different type of include than Mark was requiring.  ASP
includes are not parsed by the same way SSI includes are.

Cheers,
Andrew

-----Original Message-----
From: Jim Lawrence (AccessD) [mailto:accessd at shaw.ca]
Sent: Sunday, 21 December 2003 9:23 AM
To: Access Developers discussion and problem solving
Subject: RE: [AccessD] X-Posted: AccessD / dba-Tech : ASP

Sorry Andrew:

I did not specific that IIS or an Apache server had to be up and running but
that is a manditory item with all Server side web languages and felt it was
not necessary to stated the obvious. ...and yes you can use all kinds
extensions because the include extension is not what the parcer uses to
determine the handling of the include's contents but '<%' and '%>' symbols
are.

HTH
Jim

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Haslett, Andrew
Sent: Saturday, December 20, 2003 12:34 PM
To: 'Access Developers discussion and problem solving'
Subject: RE: [AccessD] X-Posted: AccessD / dba-Tech : ASP


 I doubt that will work Jim as you haven't specified to send the processing
of the file to the asp parser.

Only way that would work would be to associate the .incl extension with the
asp parser (in IIS).

The w3 example illustrates including files *from* an asp file.

Cheers,
Andrew

-----Original Message-----
From: Jim Lawrence (AccessD) [mailto:accessd at shaw.ca]
Sent: Saturday, 20 December 2003 12:05 PM
To: Access Developers discussion and problem solving
Subject: RE: [AccessD] X-Posted: AccessD / dba-Tech : ASP

Hi Mark:

>Can you insert ASP code into an HTML page that does not have the .asp
>extension?

In a word, "yes". Below is a very simple example.

Given a file named "time.incl" that looks like:

<%
Response.Write(Time)
%>

...then; call the file from a web page:

<html>
<body>
<h3>The time is: <!--#include file="time.incl"--></h3> </body> </html>

Now that was easy.

See more about it at http://www.w3schools.com/asp/asp_incfiles.asp

HTH
Jim



-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Mitsules, Mark S.
(Newport News)
Sent: Friday, December 19, 2003 7:39 AM
To: '[AccessD]'; '[dba-Tech]'
Subject: [AccessD] X-Posted: AccessD / dba-Tech : ASP


Quick question...

Can you insert ASP code into an HTML page that does not have the .asp
extension?

I have a requirement in our corporate intranet to maintain our pages using
server-side-includes.  This means that all pages have a .stm extension.  How
can I insert the following snippet (many thanks to Drew) into my pages?  It
works perfectly in my "Test.asp" page but hasn't yet worked on a .stm page.
Any suggestions?

Mark

*** BEGIN CODE ***
<%
strPageName="Test.asp"
dim cnn
dim rs
dim strSQL
dim strPageName
dim strIP_Address
strIP_Address=request.ServerVariables("REMOTE_ADDR")
set cnn=server.createobject("ADODB.Connection")
set rs=server.createobject("ADODB.Recordset")
cnn.Provider="Microsoft.Jet.OLEDB.4.0"
cnn.Open "\\NNSI1\Corp\PROJECTS\E13\WebLog\Statistics.mdb"
strSQL="SELECT tblHitCounter.PageName, tblHitCounter.IP_Address FROM
tblHitCounter;"
rs.Open strSQL,cnn,1,3
rs.AddNew
rs.Fields(0).value=strPageName
rs.Fields(1).value=strIP_Address
rs.Update
rs.close
set rs=nothing
cnn.close
set cnn=nothing
%>
*** END CODE ***
_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com

_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com

IMPORTANT - PLEASE READ ******************** This email and any files
transmitted with it are confidential and may contain information protected
by law from disclosure.
If you have received this message in error, please notify the sender
immediately and delete this email from your system.
No warranty is given that this email or files, if attached to this email,
are free from computer viruses or other defects. They are provided on the
basis the user assumes all responsibility for loss, damage or consequence
resulting directly or indirectly from their use, whether caused by the
negligence of the sender or not.
_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com

_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com

IMPORTANT - PLEASE READ ********************
This email and any files transmitted with it are confidential and may
contain information protected by law from disclosure.
If you have received this message in error, please notify the sender
immediately and delete this email from your system.
No warranty is given that this email or files, if attached to this
email, are free from computer viruses or other defects. They
are provided on the basis the user assumes all responsibility for
loss, damage or consequence resulting directly or indirectly from
their use, whether caused by the negligence of the sender or not.
_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com



More information about the AccessD mailing list