Forums

ASP

This topic is locked

adding recordsets to a dreamweaver template

Posted 05 Oct 2007 20:06:12
1
has voted
05 Oct 2007 20:06:12 Russell Isaac posted:
help - i am at wits end.....

below is code for a page (test3.asp) based on a template called "catalogue.dwt.asp". i need various recordsets on various pages based on this template. f i try to add a recordset to test3.asp, i'm told "making this change would involve changing cose that is locked by a template or translator" - so i cant add the recordsets (tho interestingly you can see that i did manage to somehow add two recordsets at the outset before it started saying this.

if i try to add the recordsets to the template (which is not the way i want to do it anyway), i'm told i've added code outside the html tag and wont be copied unless i add <!--TemplateInfoOutsideHTMLIsLocked-->

i have bvuilt plenty of other sites where i DONT have this issue so DW/me must be coding something different sometimes - bottom line is - how do i get to having a .dwt.asp temaplte which i can build other pages from, and then add relevant recordsets to.

i would be DEARLY GRATEFUL for anyone who can help me put this perennial problem to bed.

thanks in advance:

CODE



<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!--#include file="Connections/conn_tailormade.asp" -->
<%
Dim Recordset1
Dim Recordset1_numRows

Set Recordset1 = Server.CreateObject("ADODB.Recordset"
Recordset1.ActiveConnection = MM_conn_tailormade_STRING
Recordset1.Source = "SELECT * FROM tbl_mfr"
Recordset1.CursorType = 0
Recordset1.CursorLocation = 2
Recordset1.LockType = 1
Recordset1.Open()

Recordset1_numRows = 0
%>
<%
Dim Recordset2
Dim Recordset2_numRows

Set Recordset2 = Server.CreateObject("ADODB.Recordset"
Recordset2.ActiveConnection = MM_conn_tailormade_STRING
Recordset2.Source = "SELECT * FROM tbl_mfr"
Recordset2.CursorType = 0
Recordset2.CursorLocation = 2
Recordset2.LockType = 1
Recordset2.Open()

Recordset2_numRows = 0
%>
<html><!-- InstanceBegin template="/Templates/catalogue.dwt.asp" codeOutsideHTMLIsLocked="false" -->
<head>
<link rel="shortcut icon" href="www.bradshaw.co.uk/favicon.ico" type="image/vnd.microsoft.icon">
<link rel="icon" href="www.bradshaw.co.uk/animated_favicon1.gif" type="image/gif" >
<!-- InstanceBeginEditable name="doctitle" -->
<title>Untitled Document</title>
<!-- InstanceEndEditable -->
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<!-- InstanceBeginEditable name="head" -->
<!-- InstanceEndEditable -->
<link href="file:///C|/Documents%20and%20Settings/Russell/My%20Documents/SMALLBUSINESSMEDIA/Websites/bradshaw%20group/htdocs/css1.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
body {
background-image: url(file:///C|/Documents%20and%20Settings/Russell/My%20Documents/SMALLBUSINESSMEDIA/Websites/bradshaw%20group/htdocs/images/bg_grad.jpg);
background-repeat: repeat-x;
}
-->
</style>
</head>

<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="960" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td align="center" valign="top" bgcolor="#FF9900"><div class="banner" id="banner">
<div align="right">
<div class="bannerright" id="bannerright">
<p> </p>
<p><img src="images/corgi_buswest_logo.jpg" alt="Tailormade are CORGI registered" width="117" height="58" hspace="7" vspace="0" /><br />
<br />
</p>
</div>
</div>
</div></td>
</tr>
<tr>
<td height="10" align="left" valign="top" bgcolor="#FF9900" class="padding20">
<!--|**START IMENUS**|imenus0,inline-->
<!-- ****** Infinite Menus Core CSS [Do Not Modify!] ****** -->
<style type="text/css">.imcm ul,.imcm li,.imcm div,.imcm span,.imcm a{text-align:left;vertical-align:top;padding:0px;margin:0;list-style:none outside none;border-style:none;background-image:none;clear:none;float:none;display:block;position:static;overflow:visible;line-height:normal;}.imcm li a img{display:inline;border-width:0px;}.imcm span{display:inline;}.imcm .imclear,.imclear{clear:both;height:0px;visibility:hidden;line-height:0px;font-size:1px;}.imcm .imsc{position:relative;}.imcm .imsubc{position:absolute;visibility:hidden;}.imcm li{list-style:none;font-size:1px;float:left;}.imcm ul ul li{width:100%;float:none !important;}.imcm a{display:block;position:relative;}.imcm ul .imsc,.imcm ul .imsubc {z-index:10;}.imcm ul ul .imsc,.imcm ul ul .imsubc{z-index:20;}.imcm ul ul ul .imsc,.imcm ul ul ul .imsubc{z-index:30;}.imde ul li:hover .imsubc{visibility:visible;}.imde ul ul li:hover .imsubc{visibility:visible;}.imde ul ul ul li:hover .imsubc{visibility:visible;}.imde li:hover ul .imsubc{visibility:hidden;}.imde li:hover ul ul .imsubc{visibility:hidden;}.imde li:hover ul ul ul .imsubc{visibility:hidden;}.imcm .imea{display:block;position:relative;left:0px;font-size:1px;line-height:1px;height:0px;width:1px;float:right;}.imcm .imea span{display:block;position:relative;font-size:1px;line-height:0px;}.dvs,.dvm{border-width:0px}/*\*//*/.imcm .imea{visibility:hidden;}/**/</style>
<!--[if IE]><style type="text/css">.imcm .imea span{position:absolute;}.imcm .imclear,.imclear{display:none;}.imcm{zoom:1;} .imcm li{curosr:hand;} .imcm ul{zoom:1}.imcm a{zoom:1;}</style><![endif]-->
<!--[if gte IE 7]><style type="text/css">.imcm .imsubc{background-image:url(ie_css_fix);}</style><![endif]-->
<style type="text/css">


/* --[[ Main Expand Icons ]]-- */
#imenus0 .imeam span,#imenus0 .imeamj span {background-image:url(file:///C|/Documents%20and%20Settings/Russell/My%20Documents/SMALLBUSINESSMEDIA/Websites/acerola/htdocs/infinite/stub_arrow_down_white.gif); width:8px; height:6px; left:-10px; top:5px; background-repeat:no-repeat;background-position:top left;}
#imenus0 li:hover .imeam span,#imenus0 li a.iactive .imeamj span {background-image:url(file:///C|/Documents%20and%20Settings/Russell/My%20Documents/SMALLBUSINESSMEDIA/Websites/acerola/htdocs/infinite/stub_arrow_down_orange.gif); background-repeat:no-repeat;background-position:top left;}


/* --[[ Sub Expand Icons ]]-- */
#imenus0 ul .imeas span,#imenus0 ul .imeasj span {background-image:url(file:///C|/Documents%20and%20Settings/Russell/My%20Documents/SMALLBUSINESSMEDIA/Websites/acerola/htdocs/infinite/stub_arrow_right.gif); width:6px; height:8px; left:-6px; top:3px; background-repeat:no-repeat;background-position:top left;}
#imenus0 ul li:hover .imeas span,#imenus0 ul li a.iactive .imeasj span {background-image:url(file:///C|/Documents%20and%20Settings/Russell/My%20Documents/SMALLBUSINESSMEDIA/Websites/acerola/htdocs/infinite/stub_arrow_right.gif); background-repeat:no-repeat;background-position:top left;}


/* --[[ Main Container ]]-- */
#imouter0 {background-color:#ffffff; border-style:none; border-color:#6a6a6a; border-width:1px; padding:0px; margin:0px; }


/* --[[ Sub Container ]]-- */
#imenus0 li ul {border-color:#687a54; border-width:1px; padding:5px 8px 5px 5px; margin:0px; }


/* --[[ Main Items ]]-- */
#imenus0 li a, #imenus0 .imctitle {height:16px; background-color:#ff9900; color:#ffffff; text-align:left; font-family:Arial; font-size:11px; font-weight:normal; text-decoration:none; border-color:#687a54; border-width:1px; padding:3px 8px 1px; margin:0px; }

/* [hover] - These settings must be duplicated for IE compatibility.*/
#imenus0 li:hover>a {background-color:#ffffff; color:#ff9900; text-decoration:none; }
#imenus0 li a.ihover, .imde imenus0 a:hover {background-color:#ffffff; color:#ff9900; text-decoration:none; }

/* [active] */
#imenus0 li a.iactive {}


/* --[[ Sub Items ]]-- */
#imenus0 ul a, #imenus0 .imsubc li .imctitle {height:auto; background-color:#ff9900; color:#ffffff; text-align:left; font-size:11px; font-weight:normal; text-decoration:none; border-style:solid; border-color:#dcedcd; border-width:1px 0px; padding:2px 5px; margin:0px; }

/* [hover] - These settings must be duplicated for IE comptatibility.*/
#imenus0 ul li:hover>a {background-color:#ffe1c4; color:#ff9900; text-decoration:none; border-color:#687a54; }
#imenus0 ul li a.ihover {background-color:#ffe1c4; color:#ff9900; text-decoration:none; border-color:#687a54; }

/* [active] */
#imenus0 ul li a.iactive {}


</style>
<!-- ****** Infinite Menus Structure & Links ***** -->
<div class="imrcmain0 imgl" style="width:693px; z-index:999999; position:relative; visibility: hidden;">
<div class="imcm imde" id="imouter0">
<ul id="imenus0">
<li class="imatm" style="width:50px;"><a href="index.asp">Home</a></li>
<li class="imatm" style="width:132px;"><a href="#"><span class="imea imeam"><span></span></span>Maintenance/Repairs</a>
<div class="imsc">
<div class="imsubc" style="width:140px;top:-1px;left:0px;">
<div class="imunder"></div>
<div></div>
<ul style="">
<li><a href="emergency_repairs.asp">Emergency Repairs</a></li>
<li><a href="planned_maintenance.asp">Planned Maintenance</a></li>
</ul>
</div>
</div>
</li>
<li class="imatm" style="width:82px;"><a class="" href="#"><span class="imea imeam"><span></span></span>Equipment</a>
<div class="imsc">
<div class="imsubc" style="width:140px;top:0px;left:0px;">
<div class="imunder"></div>
<div></div>
<ul style="">
<li><a href="Cooking_equipment.asp">Cooking</a></li>
<li><a href="cooling_freezing.asp">Cooling & Freezing</a></li>
<li><a href="food_preparation.asp">Food prep</a></li>
<li><a href="beverage.asp">Beverage</a></li>
<li><a href="warewashing.asp">Warewashing</a></li>
<li><a href="watercare.asp">Water care</a></li>
<li><a href="servery.asp">Servery</a></li>
<li><a href="storage.asp">Storage</a></li>
<li><a href="catering_equipmenttabling.asp">Tabling</a></li>
</ul>
</div>
</div>
</li>
<li class="imatm" style="width:117px;"><a href="installation_services.asp">Installation/Logistics</a></li>
<li class="imatm" style="width:101px;"><a href="design_planning.asp">Design/Planning</a></li>
<li class="imatm" style="width:151px;"><a href="#"><span class="imea imeam"><span></span></span>Buying
from Tailormade</a>
<div class="imsc">
<div class="imsubc" style="width:88px;top:;left:;">
<ul style="">
<li><a href="appliance_sales.asp">Sales</a></li>
<li><a href="lease_services.asp">Leasing</a></li>
<li><a href="open_account.asp">Open Account</a></li>
<li><a href="terms.asp">Terms</a></li>
</ul>
</div>
</div>
</li>
<li class="imatm" style="width:60px;"><a href="contact.asp">Contact</a></li>
</ul>
<div class="imclear"> </div>
</div>
</div>
<!--[imcode]*** Infinite Menus Settings / Code - This script reference must appear last. ***

*Note: This script is required for scripted add on support and IE 6 sub menu functionality.
*Note: This menu will fully function in all CSS2 browsers with the script removed.-->
<script language="JavaScript" src="file:///C|/Documents%20and%20Settings/Russell/My%20Documents/SMALLBUSINESSMEDIA/Websites/acerola/htdocs/infinite/ocscript.js" type="text/javascript"></script>
<!--|**END IMENUS**|-->
</td>
</tr>
</table>
<table width="960" border="0" align="center" cellpadding="10" cellspacing="0">
<tr>
<td width="750" align="left" valign="top" bgcolor="#000000"><table width="688" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="left" valign="top" class="bodycopy"><div align="left"><!-- InstanceBeginEditable name="body" -->
<table border="1" bordercolor="#333333">
<tr>
<%
' Horizontal Looper version 3
While ((Repeat_rs_cat__numRowsHL <> 0) AND (NOT rs_cat.EOF))
%>
<td><table width="150" border="0" cellspacing="0" cellpadding="3">
<tr>
<td class="headingwhite"><%=(rs_cat.Fields.Item("item_cat".Value)%></td>
</tr>
<tr>
<td> </td>
</tr>
</table></td>
<%
'Horizontal Looper version 3
Repeat_rs_cat__indexHL=Repeat_rs_cat__indexHL+1
Repeat_rs_cat__numRowsHL=Repeat_rs_cat__numRowsHL-1
rs_cat.MoveNext()
if len(nested_rs_cat)<=0 then
nested_rs_cat = 1
end if
if ((Repeat_rs_cat__numRowsHL <> 0) AND (NOT rs_cat.EOF) AND (nested_rs_cat mod 3 = 0)) then
Response.Write "</tr><tr>"
end if
nested_rs_cat = nested_rs_cat + 1
'end horizontal looper version 3
Wend
%>
</tr>
</table>
<p> </p>
<p> </p>
<p> </p>
<!-- InstanceEndEditable --></div></td>
</tr>
</table>
<br /> <br /></td>
<td width="210" valign="top" bgcolor="#000000" "><!-- InstanceBeginEditable name="search" -->searc
<table width="140" border="0" align="left" cellpadding="6" cellspacing="1">
<tr>
<td width="152" align="center" valign="top" bgcolor="#FF9900"><h2 align="center">SEARCH
</h2></td>
</tr>
<tr>
<td width="152" align="center" valign="top" bgcolor="#FF9900"><div align="center"><img src="images/logo_org.jpg" alt="Contact Tailormade" width="125" height="26" /><br />
<span class="bodycopyblack">Contact us to discuss your requirements
- call 01275 390590 or email us <a href="contact.asp">here</a></span><br />
<span class="style2"> </span></div></td>
</tr>
<tr>
<td height="20" align="center" valign="top"></td>
</tr>
</table>
h<!-- InstanceEndEditable --></td>
</tr>
</table>
</body>
<!-- InstanceEnd --></html>
<%
Recordset1.Close()
Set Recordset1 = Nothing
%>
<%
Recordset2.Close()
Set Recordset2 = Nothing
%>

Reply to this topic