Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.0 and 1.1 Basics
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Display Modes
  #1 (permalink)  
Old April 14th, 2005, 10:55 AM
Registered User
 
Join Date: Apr 2005
Location: , , .
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


  #2 (permalink)  
Old April 14th, 2005, 02:40 PM
planoie's Avatar
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
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
 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

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 04:23 PM
Data Binding Prashant.k.m Visual Studio 2005 0 April 21st, 2005 07:54 AM
Binding to Filtered Data (or Data subsets) gdbjohnson C# 8 August 27th, 2004 02:59 PM
Data binding. mmwaikar ADO.NET 0 July 28th, 2003 01:51 PM



All times are GMT -4. The time now is 01:13 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.