Print Page | Close Window

Sorry, i got another displaying question

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=14630
Printed Date: 30 March 2026 at 6:37am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Sorry, i got another displaying question
Posted By: thefrost
Subject: Sorry, i got another displaying question
Date Posted: 09 April 2005 at 3:55pm
I am having a problem that some of you guys may have encountered before.
I have my database table having a "Menu_id" field which is used for the javascript of showing the popup menus and i need a alternative way of querying the database and displaying the code and if the menu_id is different start over. The code i have right now is
 
<%
db_PATH = "D:\Inetpub\wwwroot\Sky-WorldForum\pchoops-com\database\pchoops.mdb"
'--------------------------------------------------------------
 Set db_CON = Server.CreateObject("ADOdb.CONnection")
 db_CON.Open "DRIVER={Microsoft Access Driver (*.mdb)}; dbQ=" & db_PATH
 Set db_RS = Server.CreateObject("ADOdb.Recordset")
 db_SQL = "select * from teampages where school='" & schoolid & "' and menu_id='JHcb34e555z45azerffx3xeg4r'"
 db_RS.CuRSorType = 2
 db_RS.LockType = 3
 db_RS.Open db_SQL, db_CON
%>

<%
if not db_rs.eof then
startsubmenu("JHcb34e555z45azerffx3xeg4r")
while not db_rs.eof
submenu db_RS("title"), domain & script_name & "?sid=" & schoolid & "&spid=" & db_RS("id")
db_RS.movenext
wend
endsubmenu()
else
startsubmenu("JHcb34e555z45azerffx3xeg4r")
submenu "No Content Published", "#"
endsubmenu()
end if
%>
 
where i specified the menu_id is what needs to be changed each time and the "JHcb34e555z45azerffx3xeg4r" is one of the menu ids, Pretty much i made 5 of the above with different menu_id's
 
Please help me on this one its been bugging me for a while now since the code works but i cant find another efficient way that wont most likely crash in the end



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net