dataset and relationships
Messages   Related Types
This message was discovered on ASPFriends.com 'aspngdatagridrepeaterdatalist' list.


Alastair Moore
-- Moved from [aspngfreeforall] to [aspngdatagridrepeaterdatalist] by mrpike <Click here to reveal e-mail address> --

Hello ASP.NET-ites!

Just been doing a bit of reading about the DataSet and it's ability to create
relationships with these tables. Firstly, I thought - what's the point? Surely
it's the database's job to control relationships. But then I suppose it
clicked - if you're storing a number of tables in a dataset it could become
quite handy.

If I had a dataset containing a few tables, for example a client table which
contained name, address, phone number email etc. plus a gender field, and a
marital status field, and also returned a table containing gender types and
marital status types. The gender and marital types would be bound to a listbox
and the client table bound to a number of different form objects - another
question for later! - could I use relationships to automatically select the
gender type and marital status in the listboxes? ie. <option value="blah"
selected>?

I realise this is going to be an open question, but how else are people using
relationships within a dataset?

I might as well as my binding to multiple form objects question! Going back to
the client table, I would have a number of form objects on my aspx page. How
would I bind the individual fields from the table to the individual form
objects?

Thanks,

Alastair

Reply to this message...
 
    
Feduke Cntr Charles R
> I realise this is going to be an open question, but how else are people
using
> relationships within a dataset?

    Actually relationships are probably one of the coolest things in
ADO.NET. You can use them to check for constraints before you execute
updates on the actual data source (early exception catching - stopping them
before you send all that data back across the network just to get an
exception from the database). What I use them for (with the .Nested
attribute set to true) is with the DataSet.WriteXml. This creates an
acceptible XML format, nothing like the adPersistXml trash from ADO 2.5,
which can be easily used with XSLT to create nice HTML (or whatever) files.

- Chuck

-----Original Message-----
From: Alastair Moore [mailto:Click here to reveal e-mail address]
Sent: Monday, August 12, 2002 5:20 AM
To: aspngDataGridRepeaterDatalist
Subject: [aspngdatagridrepeaterdatalist] dataset and relationships

-- Moved from [aspngfreeforall] to [aspngdatagridrepeaterdatalist] by mrpike
<Click here to reveal e-mail address> --

Hello ASP.NET-ites!

Just been doing a bit of reading about the DataSet and it's ability to
create
relationships with these tables. Firstly, I thought - what's the point?
Surely
it's the database's job to control relationships. But then I suppose it
clicked - if you're storing a number of tables in a dataset it could become
quite handy.

If I had a dataset containing a few tables, for example a client table which
contained name, address, phone number email etc. plus a gender field, and a
marital status field, and also returned a table containing gender types and
marital status types. The gender and marital types would be bound to a
listbox
and the client table bound to a number of different form objects - another
question for later! - could I use relationships to automatically select the
gender type and marital status in the listboxes? ie. <option value="blah"
selected>?

I realise this is going to be an open question, but how else are people
using
relationships within a dataset?

I might as well as my binding to multiple form objects question! Going back
to
the client table, I would have a number of form objects on my aspx page. How
would I bind the individual fields from the table to the individual form
objects?

Thanks,

Alastair
| [aspngdatagridrepeaterdatalist] member Click here to reveal e-mail address = YOUR ID
| http://www.aspfriends.com/aspfriends/aspngdatagridrepeaterdatalist.asp =
JOIN/QUIT

Reply to this message...
 
 
System.Data.DataSet




Ad
MBR BootFX
Best-of-breed application framework for .NET projects, developed by Matthew Baxter-Reynolds and MBR IT
 
 Copyright © Matthew Baxter-Reynolds 2001-2008. '.NET 247 Software Development Services' is a trading style of MBR IT Solutions Ltd.
Contact Us - Terms of Use - Privacy Policy - www.dotnet247.com