Getting content from three different tables

G

Guest

Hi
I really really hope someone can help me out with whis - since Im fearly new in this world.

I want to build up a navigation with elements from my main category table. Then, for each kategory there may be one ore more products with a title defined in another table. The relations between my products and main kategory is defined in a third table wich only contains the id from the two other tables.

Now, I managed to collect out the content from my main kategory table and listed this out on my site.
I created a dataReader object and uset a repeater control:

Dim strConn As String
strConn = "Provider= etc........"
strSQL = "Select * From tbl_ProduktGrupper"
objConn = New OleDbConnectio(strConn)
objConn.Open()

Dim objDataAdapter As New OleDbDataAdapter(strSQL, strConn)
objDataAdapter.Fill(dsDataSet)
PGRepeater.DataSource = dsDataSet.Tables(0).DefaultView
PGRepeater.DataBind()
objConn.Close()

Now: this result is connected to my RepeaterControl with the name PGRepeater
So: my question = where do I go next? What is the easiest/simplest way to do a new look up in my other tables to list out the title of the products that belong to eatch of the main kategories - and relate this Product title to correct Kategory??

This is sort of what I want the result to look like:
Main kategory 1
- Product Title A
- Product Title B
- Product Title C
- Product Title D
Main kategory 2
- Product Title A
- Product Title B
Main kategory 3
Main kategory 4
- Product Title A
- Product Title B
- Product Title C
- Product Title D
- Product Title E

phu! Anyone outthere please!! ??
 
J

John Saunders

jatzzi said:
Hi
I really really hope someone can help me out with whis - since Im fearly new in this world.

I want to build up a navigation with elements from my main category table.
Then, for each kategory there may be one ore more products with a title
defined in another table. The relations between my products and main
kategory is defined in a third table wich only contains the id from the two
other tables.

You can add your other two tables to the dataset, along with the relations
between them. I believe you will then be able to bind a nested repeater
through the relations, to the table with the titles, and it will only get
those titles which correspond to the current category.
 
G

Guest

hmmm...ok
But how do I list the content out on my aspx page. Do I have
to make one repetaer control for each element I want to show on the page? Like one RepeterConrol for the Kategory Name form this table and one for the title from the Product table. And how do I manage to nest this correctly??
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top