Jim Lawrence (AccessD)
accessd at shaw.ca
Sat Dec 20 16:53:18 CST 2003
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