Jim Lawrence (AccessD)
accessd at shaw.ca
Sun Dec 21 10:31:47 CST 2003
Hi Andrew: I already fired a response away before reading your message. Anyway you could view this http://www.bignosebird.com/sdocs/include.shtml 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:47 PM To: 'Access Developers discussion and problem solving' Subject: RE: [AccessD] X-Posted: AccessD / dba-Tech : ASP Jim, Tried your example and couldn't get it to work (unless I changed the initial files extension to .asp which then sent the include to the asp parser). Anyway, I've given a more thorough answer for Mark on the tech list, so we'll keep it there and try to keep the mods happy ;=) Cheers, Andrew -----Original Message----- From: Haslett, Andrew [mailto:andrew.haslett at ilc.gov.au] Sent: Sunday, 21 December 2003 6:07 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 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