Wrox Programmer Forums
|
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 14th, 2005, 09:55 AM
Registered User
 
Join Date: Apr 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Data quering and binding!!!!

How to read data from 3 tables so that quering every table according to the each item in one of the tables to get the following figure:

Title1
 Paragraph 1
   Bullet1
   Bullet2
 Paragraph 2
   Bullet1
   Bullet2
and so on......
I have tbl_Title,tbl_Paragraph,tbl_Bullet
I want the result in a datalist.
Thanks


 
Old April 14th, 2005, 01:40 PM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

There are a couple ways to do this.

Option 1
Create a query that gets you all the fields you need by joining together the tables required. Then you could spin thru the results and build your text result. You'll need to keep track of what the current title and paragraph is so you can tell when you get to a row that contains a new one.

Option 2
Fill a DataSet with the data from all three tables, and set up DataRelations between the tables. Then you can use nested databinding to display the results.

Here's a sample of how to do nested binding with a DataSet:
http://www.geekdork.com/samples/complexDatagrid.aspx


-Peter





Similar Threads
Thread Thread Starter Forum Replies Last Post
Data Binding - Editing GridView Row Data desk_star BOOK: Professional ASP.NET 2.0 and Special Edition; ISBN: 978-0-7645-7610-2; ISBN: 978-0-470-04178-9 7 December 30th, 2007 11:07 AM
Data Binding Quick209 Classic ASP Databases 0 July 18th, 2005 03:23 PM
Data Binding Prashant.k.m Visual Studio 2005 0 April 21st, 2005 06:54 AM
Binding to Filtered Data (or Data subsets) gdbjohnson C# 8 August 27th, 2004 01:59 PM
Data binding. mmwaikar ADO.NET 0 July 28th, 2003 12:51 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.