473,320 Members | 1,612 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

1->n relation display question

Guy
I'm a little bit confused as what is the bes way to achieve the following:
I have 2 database tables, table 1 product en table 2 image. For every
product record there can be 0-1 or more image records.

My question:
What is the best way to display the product record with the respective image
record(s)? Using a FormView for the product record and a GridView/DataList
for the image record(s)?
Or, writing own code (using Table, Row, Cells and within the cells the
controls like FileUpload, TextBox, ...) to save, edit, delete the data in the
two tables?

Thanks for your suggestions.
Mar 28 '06 #1
4 1270

I usually use a nested FormView

this KB helps

http://support.microsoft.com/default...b;EN-US;326338

just switch the gridview with a formview

...


"Guy" <Gu*@discussions.microsoft.com> wrote in message
news:88**********************************@microsof t.com...
I'm a little bit confused as what is the bes way to achieve the following:
I have 2 database tables, table 1 product en table 2 image. For every
product record there can be 0-1 or more image records.

My question:
What is the best way to display the product record with the respective image record(s)? Using a FormView for the product record and a GridView/DataList
for the image record(s)?
Or, writing own code (using Table, Row, Cells and within the cells the
controls like FileUpload, TextBox, ...) to save, edit, delete the data in the two tables?

Thanks for your suggestions.

Mar 28 '06 #2
Guy
thanks for the info but

what do you mean with: just switch the gridview with a formview
"sloan" wrote:

I usually use a nested FormView

this KB helps

http://support.microsoft.com/default...b;EN-US;326338

just switch the gridview with a formview

...


"Guy" <Gu*@discussions.microsoft.com> wrote in message
news:88**********************************@microsof t.com...
I'm a little bit confused as what is the bes way to achieve the following:
I have 2 database tables, table 1 product en table 2 image. For every
product record there can be 0-1 or more image records.

My question:
What is the best way to display the product record with the respective

image
record(s)? Using a FormView for the product record and a GridView/DataList
for the image record(s)?
Or, writing own code (using Table, Row, Cells and within the cells the
controls like FileUpload, TextBox, ...) to save, edit, delete the data in

the
two tables?

Thanks for your suggestions.


Mar 28 '06 #3

I mean, the example KB I sent... they are using a Repeater as the control
with the nested data.
This is code from the KB

<asp:repeater id="childRepeater"
runat="server" datasource='<%#
Container.DataItem.Row.GetChildRows("myrelation") %>'>

<itemtemplate>
<%# Container.DataItem("title_id") %><br>
</itemtemplate>
</asp:Repeater>

Change this to a <asp:formview

but keep the datasource= ... syntax

"Guy" <Gu*@discussions.microsoft.com> wrote in message
news:39**********************************@microsof t.com...
thanks for the info but

what do you mean with: just switch the gridview with a formview
"sloan" wrote:

I usually use a nested FormView

this KB helps

http://support.microsoft.com/default...b;EN-US;326338

just switch the gridview with a formview

...


"Guy" <Gu*@discussions.microsoft.com> wrote in message
news:88**********************************@microsof t.com...
I'm a little bit confused as what is the bes way to achieve the following: I have 2 database tables, table 1 product en table 2 image. For every
product record there can be 0-1 or more image records.

My question:
What is the best way to display the product record with the respective

image
record(s)? Using a FormView for the product record and a GridView/DataList for the image record(s)?
Or, writing own code (using Table, Row, Cells and within the cells the
controls like FileUpload, TextBox, ...) to save, edit, delete the data
in the
two tables?

Thanks for your suggestions.


Mar 28 '06 #4
I did something similar using a repeater control.

"Guy" wrote:
I'm a little bit confused as what is the bes way to achieve the following:
I have 2 database tables, table 1 product en table 2 image. For every
product record there can be 0-1 or more image records.

My question:
What is the best way to display the product record with the respective image
record(s)? Using a FormView for the product record and a GridView/DataList
for the image record(s)?
Or, writing own code (using Table, Row, Cells and within the cells the
controls like FileUpload, TextBox, ...) to save, edit, delete the data in the
two tables?

Thanks for your suggestions.

Mar 28 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Maria Kovacs | last post by:
I am a begginner with ASP. Can someone help me fix this? I am trying to display order tracking links from a DB table. If there is a tracking link listed for a company it should display "Track...
2
by: Irwinsp | last post by:
Hi All, I have a form with an auto number field displayed. The field looks great except when the user is entering a new record. The field then has the text "auto number" in it. Is there a...
1
by: Johnfcf | last post by:
I have a database consisting of 3 tables, the main table with main contact info, a second table with additional address info and a third table consisting of additional contact information, or more...
5
by: Will | last post by:
I've got a simple form that collects data from a user and I want to display that data in a sortable grid or table. The nature of this data is rather temporary, so there's no need to persist it to a...
0
by: David Laub | last post by:
When I bind a collection to a DataGrid (with teh single statement DataBind), I love that the property names become the column names/values for the grid. But I HATE that the columns are (seemingly?)...
1
by: Andre | last post by:
Hi, I need a little advice with this ; I retreive some data from a database, and i want to create an output with a link, logo image, title etc.. But i want to change the data before...
1
by: adamwashere | last post by:
Hi all, I work with the Clinton Foundation and I have a question about displaying data. We have an Access database in which many statistics have been compiled for many countries from many...
1
by: Ginger Estherskip | last post by:
I'm setting up a dataset using the GUI to have a Parent Data Table and a few Child Data Tables. I then have a form that uses that dataset, and I can fill the appropriate datatables et. al., but...
1
by: pinkk58 | last post by:
hi... I have stored an array in a single field, like dest in destination fiels, no_of_days in no_of_days field and hotel_name in hotel_name field in mysql .. now i want to display array values...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.