Several Questions on ADO.NET

C

cnSoftware

Hi,there

I get some problems when I am struggling
in ADO.NET programming. I should really preciate
your kindly advice.

1.How could I perform a data paging on master-detail
datasets,especially the detail one? As I thought,
I retrieve the master data and detail data seperately
and then associate them through dataRelation.
So it seems that I can paging the master data readily
but how about the detail data?

2.Suppose I use DataSet only in my asp.net application.
How could I re-position to the row after I insert a
new row into the dataset?

3.I am editing a datarow. When I modify the value in a column,
I hope value in another column should change correspondingly ASAP.
For instance, the "Cost" column should change with "Price"
column and "Quantity" column correspondingly. In what event
should I place the code?

Thanks.
 
S

Sahil Malik

1. ASP.NET or Winforms?
2. By saving the last row # and going back to
InterestedTable.DataRowCollection[thatnumber]. Dataset unlike Recordset
allows for free up and down traversal on the dataset, like RAM :)
3. Use DataColumn.Expression. If you insist on doing this using events, then
in 1.1 ur gonna have to use events on either the table or a default dataview
associated with the table. in .NET 2.0 you've got a lot of brand new events
for this purpose. (See
http://dotnetjunkies.com/WebLog/sahilmalik/posts/37433.aspx ).

- Sahil Malik
http://dotnetjunkies.com/weblog/sahilmalik
 
C

Cor Ligthert

Hi,

In addition to Sahil,

A dataset cannot really be positioned . A dataset holds datatable, which
holds rows which can be positioned.

A datatable can be used via a dataview (or the standard defaultview) which
makes it possible to select a part of the rows or see them in another sorted
way.

Just meant as addition.

Cor
 

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

Top