Avatar billede pelkjaer Nybegynder
22. marts 2002 - 12:23 Der er 20 kommentarer og
1 løsning

"sub-tables"??

Lad os sige at man har en side med fx. 10 hovedmenuer og dertilhørende 10 submenuer (pr. hovedmenu).

Og dem vil jeg gerne ha ind i en access database i éen stor tabel, ellers skal jeg jo lave 10 recordsets på en side.

Kan man i access lave "sub-tables"?
Avatar billede henrik13 Nybegynder
22. marts 2002 - 12:28 #1
Er du ny i access. hold dig til en tabel. Senere lærer du opdelingen, og de ting der skal til at dele dem.
VH Henrik
Avatar billede pelkjaer Nybegynder
22. marts 2002 - 12:31 #2
Sådan et svar kan jeg ikke bruge til noget som helst.

Jeg vil gerne vide om man kan lave "subtables" i access, da jeg ikke har lyst til at lave 10 tabeller og dermed 10 recordsets.
Avatar billede henrik13 Nybegynder
22. marts 2002 - 12:34 #3
Undskyld.
VH Henrik
Avatar billede terry Ekspert
22. marts 2002 - 13:50 #4
Sub tables! NO a table is a table. But you could have a table which contains your menus and sub menu data. For example one of the fields contains an ID of the parent menu. The top levels field will be empty.
Avatar billede pelkjaer Nybegynder
22. marts 2002 - 13:55 #5
I don't understand.

How can I have all my "mainmenus (title)", submenus (artid)" and "content "maintext") in one table?

Is there, btw, a "rule" for how many recordsets allowed on one page?
Avatar billede terry Ekspert
22. marts 2002 - 14:22 #6
pelkjaer>I am not sure whta it is you are trying to do so it shard for me to give a solution to your probelm. The question was "Kan man i access lave "sub-tables"? and the answer is NO.

What do you mean recordsets on one page, are we talking about a web application? You can have more than one recordset open for each page!
Avatar billede pelkjaer Nybegynder
22. marts 2002 - 14:28 #7
Well, when you say NO, what is "underdataark" then?

My problem is, that I do not know how to struture my database.

I am making a website with 10 mainmenus. Those mainmenus each have about 10 submenus. And each submenu have content.

How should make the db?
Avatar billede terry Ekspert
22. marts 2002 - 14:38 #8
a table is used for storing data in. Forms (pages) show the data in the tables thes can be main forms or sub forms.

An example as to how you could design your table

ID
ParentID
MenuName




Example:

ID         1
ParentID     0
ManuName     "Top Level Menu 1"

ID        2
ParentID    1
ManuName    "Second Level Menu 1"

ID        3
ParentID    1
ManuName    "Second Level Menu 1"

ID        4
ParentID    2
ManuName    "Third Level Menu 2"
Avatar billede pelkjaer Nybegynder
22. marts 2002 - 14:45 #9
Okay..

Would you create an example of that and send the database to me? I don't really get it.

webmaster@peterelkjaer.dk
Avatar billede terry Ekspert
22. marts 2002 - 14:47 #10
yes but I am on the way home now. Access 97 or 2000?

NOTE: It is only the table I will make nothing else with fors and pages!
Avatar billede pelkjaer Nybegynder
22. marts 2002 - 14:54 #11
Access 2000.

The only I would like you to do, is an example database, with:

mainmenus
submenus
content for submenus

That's all :o)
Avatar billede terry Ekspert
22. marts 2002 - 16:24 #12
? do you mean a single table? I can easily make this but you have to make the code to get the information OUT of the table in your WEB application!
Avatar billede pelkjaer Nybegynder
22. marts 2002 - 17:16 #13
Terry>>It's no problem to make the asp-code. I know what to do with only one urlparameter (like http://www.demenskonsulent.dk/oil/content.asp?title=products - which I have made) - the problem is the submenus.
Avatar billede pelkjaer Nybegynder
22. marts 2002 - 17:17 #14
Somethinglike http://www.demenskonsulent.dk/oil/content.asp?title=products&submenus <--------

&submenus = submenus

Hope you can see what I mean :o)
Avatar billede terry Ekspert
22. marts 2002 - 17:29 #15
I am not at ALL usre what you mean?
plekjaer>I can NOT help you make your menu for you I am NOT a web programmer! You asked a question about Access and that is what I gave you help on. I CAN make the table for you BUT it is up to you how you use it in your WEB program!

You should not mix databases(tables) and programs together. The link you sent IS NOT a database it is a WEB page which "maybe" uses a database for holding th emenu names etc. but it doesnt mean that it DOES use a database!
Also concerning the link! I can not get the submenus to work!
Avatar billede pelkjaer Nybegynder
22. marts 2002 - 17:47 #16
Terry>>Forget it - you don't understand what I mean.

All I asked, was for you to make a database table example.

The page I linked to, is made by me. But is has no submenus, so the database table is simple.
Avatar billede pelkjaer Nybegynder
22. marts 2002 - 17:49 #17
Concerning the link - there ARE'NT any submenus - the "&submenus" is just to simulate what I want in my database table.
Avatar billede terry Ekspert
22. marts 2002 - 19:33 #18
another question has just popped up which you may find of use!

http://www.eksperten.dk/spm/188665
Avatar billede pelkjaer Nybegynder
23. marts 2002 - 09:07 #19
Thanks for the db Terry.
Avatar billede terry Ekspert
23. marts 2002 - 09:34 #20
jus noticed a little error in my example:

ID        1
ParentID    0
ManuName    "Top Level Menu 1"

ID        2
ParentID    1
ManuName    "Second Level Menu 1"

ID        3
ParentID    1
ManuName    "Second Level Menu 1"

ID        4
ParentID    2
ManuName    "Third Level Menu 1"
Avatar billede pelkjaer Nybegynder
23. marts 2002 - 09:39 #21
Alright thanks :)
Avatar billede Ny bruger Nybegynder

Din løsning...

Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.

Loading billede Opret Preview
Kategori
Dyk ned i databasernes verden på et af vores praksisnære Access-kurser

Log ind eller opret profil

Hov!

For at kunne deltage på Computerworld Eksperten skal du være logget ind.

Det er heldigvis nemt at oprette en bruger: Det tager to minutter og du kan vælge at bruge enten e-mail, Facebook eller Google som login.

Du kan også logge ind via nedenstående tjenester