Forums

This topic is locked

How many recordsets on one page?

Posted 22 Mar 2002 13:07:53
1
has voted
22 Mar 2002 13:07:53 Peter Elkjaer posted:
Is there a "rule"?

I am building a page with 10 menus, and about 10 submenus for each menu.

The easiest for me, would to create 10 access-tables, and then 10 recordsets.

What else can I do? Can I create "subtables" inside an Access-database? If yes, how?

Replies

Replied 22 Mar 2002 14:07:32
22 Mar 2002 14:07:32 Ian Etherington replied:
Hi there, you can have as many recordsets as you like, but it is best to keep it to a minimum

Ian

"To start press any key", where's the any key?
Replied 22 Mar 2002 22:03:05
22 Mar 2002 22:03:05 Viktor Farcic replied:
10 open recordsets is more then anyone would advice. Especially if you're using Access as DB. Even with one recordset, Access can make problems with many users accessing it at the same time. With 10 recordsets for a menu... Don't do it that way!

<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
Is there a "rule"?

I am building a page with 10 menus, and about 10 submenus for each menu.

The easiest for me, would to create 10 access-tables, and then 10 recordsets.

What else can I do? Can I create "subtables" inside an Access-database? If yes, how?


<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>

Viktor Farcic

TalkZone Manager
Replied 23 Mar 2002 00:00:46
23 Mar 2002 00:00:46 Dennis van Galen replied:
a rule ?
try using the JOIN features, good Dbase relations can reduce recordsets dramatically, you could for instance get ALL menu items in one go and using a join you can grab the submenus in the same run. But isn't this a bit drastic, 10 menus with 10 subs each, that's 100 menu entries, even when using pulldown menus it'll be a pain to navigate through.

Why don't you try creating a Fireworks menu and put the entries in a XML datafile, it saves recordsets and server activity, if you want you can also draw the data for the Fireworks menu from a Dbase.

But 10 recordsets is not what you want, besides the server lag it is also a pain manipulating a page with so many recordsets, every dynamic entry you alter results in a slow system that refreshes the page and the recordsets. You could also draw in the first 10 menu items then dynamically grab the 10 subs that need to be shown.

Another option, probably the best would be something like this:

Make a Dbase table called Menu with columns "ID", "MenuID", "MenuName", "MenuTarget".
ID = Unique
MenuID = text field containing something like, 1, 1_1, 1_2, 1_3, etc till 1_10, 2_1. etc..
MenuName = text field containing the names you want to display.
MenuTarget = text field containing the URL's where the menu's go.

Then you grab all those menu's and you have to write a little code to split the items and show them accordingly. This is probably the best method, but involves a pretty good deal of handcoding. The easiest way to do this is make the menu in a external file, like the one that fireworks creates then alter this file to grab the data, split it in variables, write out the menu items and have the page check to see if it has sub items then it has to write those before. Hmmm, i will try this for my big support site and if it works i will show you how to do this.
Maybe someone could write a behavior for this, because that would be SOO cool !

With kind regards,

Dennis van Galen
Webmaster KPN Services
Financial and Information Services
Replied 23 Mar 2002 09:31:43
23 Mar 2002 09:31:43 Peter Elkjaer replied:
Hi everybody

A lot of answers hehe <img src=../images/dmxzone/forum/icon_smile_shock.gif border=0 align=middle>

Dennis--&gt;No Fireworks <img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>
Well, maybe I don't have 10x10 menus exactly. See for yourself demenskonsulent.dk/new/test.html

What I basically need to go in an access-table is:

1) Main menus
2) Submenus (with title so I can update them via cms)
3) "content" (when selected a submenu)

I think my problem is, that I do not know how to structure my database after those needs - can you help me with that?
Replied 23 Mar 2002 18:21:01
23 Mar 2002 18:21:01 Dennis van Galen replied:
That's not so hard, you just need to set it up so that a referential integrity exists between the main menu's and sub menu's. I'll give you something to start with.
I made the relations like this:
dennisvg.homeip.net/FIS/Elkjaer_menu.gif
As you can see the sub items would redirect to a article.asp page with a parameter like ?subMenuID=15
15 in this case would bring up: sub item 3 of main item 3. Your CMS pages should use the same principle, edit a main menu item and on the mainMenuedit.asp page we would have options to alter the submenus and the related articles, for complete ease I stuffed the content in the submenu table.
You can examine it further by downloading this file djvgalen.tripod.com/Elkjaer.zip


With kind regards,

Dennis van Galen
Webmaster KPN Services
Financial and Information Services
Replied 23 Mar 2002 22:06:55
23 Mar 2002 22:06:55 Peter Elkjaer replied:
Wow - thanks Dennis.

That was genereous of you.
It looks kind of advanced <img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle> - I did'nt know access could do that.

Thanks again, Peter

Reply to this topic