[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

5.6

Displaying recorsets in dropdown menu

Asked by Svjetlana in Active Server Pages (ASP)

Tags: random, recorsets

I am trying to display records called "Title" from the Sections DB table horizontally in the dropdown menu and any related recordsets (connected via secondary key SectionID) called "Title" from the Files DB table vertically and every time I add

while not objRs.eof
objRs.MoveNext
wend

when getting recordsets from the Section DB table I receive Either BOF or EOF is True Error. Otherwise the code below displays random menu (see below) where I can not figure out what File Title belongs to what Section. Any ideas, please help. I am just going in circles now and can not find any solution what so ever.

code:
Sub readItemsFromDatabase
Dim db,q,sql,objRs,rsarr,rsarr2,p_page_id,p_title,p_sec_id,p_sec,p_parent_id,cols,max,menu
        'The path to database:
      db ="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("DB.mdb")
 
  q = "SELECT sectionid, Title, parentid From Sections Order by sectionid"
 
  Set objRs=Server.CreateObject("ADODB.Recordset")
  Set sqlobjRs=Server.CreateObject("ADODB.Recordset")
  objRs.CacheSize = 25             
  objRs.CursorType = 3
  objRs.LockType = 3
 
  'Opening database --- --
  objRs.Open q,db

 
  sql = "Select fileid, title, sectionid From Files Where sectionid = " &  objRs("sectionid") & " and Files.DLCId = 4"
 
 
  sqlobjRs.Open sql,db
 
   if NOT objRs.EOF then  
    rsarr = objRs.GetRows()
            max = Ubound(rsarr,2)
   else
            max = ""
  end if
 
   
  if NOT sqlobjRs.EOF then
    rsarr2 = sqlobjRs.GetRows()
            max = Ubound(rsarr2,2)
  else
            max = ""
  end if
  'Closing database
 
 
      row=0
      do while(row<=max) 'Looping rows
    'Setting variables
    menuparentlink = "m" & rsarr(0,row)
      p_sec_id = rsarr(0,row)
      p_sec = rsarr(1,row)
      p_page_id = rsarr2(0,row)
    p_title = rsarr2(1,row)
      pagelink = "mypage.asp?id=" & p_page_id
    p_parent_id = rsarr2(2,row)
    if(p_parent_id<>0) then
                  p_parent_id = "m" & p_parent_id
    else
                  p_parent_id=""
    end if
            'Making menu item
      menu = menu & ""
    Response.write("oCMenu.makeMenu('" & menuparentlink & "','" &p_parent_id & "','" & p_sec & "','" & pagelink & "')" & vbcrlf)
         row = row + 1
      loop
      
      objRs.close()
    Set objRs = Nothing
    sqlobjRs.close()
    Set sqlobjRs = Nothing
      
End Sub


random menu display:

oCMenu.makeMenu('m71','m71','company','mypage.asp?id=297')
oCMenu.makeMenu('m72','m71','disciplines','mypage.asp?id=298')
oCMenu.makeMenu('m73','m71','library','mypage.asp?id=306')
oCMenu.makeMenu('m74','m71','gallery','mypage.asp?id=309')
oCMenu.makeMenu('m75','m71','web','mypage.asp?id=310')
oCMenu.makeMenu('m76','m71','marketing','mypage.asp?id=314')
oCMenu.makeMenu('m77','m71','section','mypage.asp?id=351')
oCMenu.makeMenu('m79','m71','test','mypage.asp?id=352')
oCMenu.makeMenu('m80','m71','The Project','mypage.asp?id=353')
oCMenu.makeMenu('m81','m71','Project Management','mypage.asp?id=354')

[+][-]04/20/06 03:25 PM, ID: 16503072Accepted Solution

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

About this solution

Zone: Active Server Pages (ASP)
Tags: random, recorsets
Sign Up Now!
Solution Provided By: peterxlane
Participating Experts: 2
Solution Grade: A
 
[+][-]04/19/06 10:25 AM, ID: 16490051Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04/19/06 10:34 AM, ID: 16490148Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04/19/06 10:49 AM, ID: 16490304Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04/19/06 10:53 AM, ID: 16490341Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04/19/06 10:54 AM, ID: 16490353Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04/19/06 10:55 AM, ID: 16490362Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04/19/06 10:56 AM, ID: 16490376Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04/19/06 10:56 AM, ID: 16490385Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04/19/06 10:57 AM, ID: 16490392Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04/19/06 10:59 AM, ID: 16490416Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04/19/06 11:03 AM, ID: 16490448Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04/19/06 11:23 AM, ID: 16490639Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04/19/06 11:31 AM, ID: 16490742Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04/19/06 11:40 AM, ID: 16490836Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04/19/06 12:09 PM, ID: 16491204Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04/19/06 12:14 PM, ID: 16491275Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04/19/06 12:28 PM, ID: 16491463Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04/19/06 12:40 PM, ID: 16491579Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04/19/06 01:08 PM, ID: 16491873Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04/19/06 01:38 PM, ID: 16492177Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04/19/06 01:59 PM, ID: 16492443Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04/19/06 02:28 PM, ID: 16492711Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04/19/06 03:00 PM, ID: 16492994Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04/20/06 05:00 AM, ID: 16497206Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04/20/06 09:42 AM, ID: 16499962Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04/20/06 10:06 AM, ID: 16500184Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04/20/06 12:41 PM, ID: 16501771Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04/22/06 05:36 AM, ID: 16514654Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05/17/06 09:54 AM, ID: 16701014Administrative Comment

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 30-day free trial to view this Administrative Comment or ask the Experts your question.

 
[+][-]05/18/06 07:00 AM, ID: 16708873Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091111-EE-VQP-92