Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP Migration - Moving Through DataSets

Reply
Thread Tools

ASP Migration - Moving Through DataSets

 
 
Don Miller
Guest
Posts: n/a
 
      12-17-2006
In my migration from ASP to ASP.NET 2.0, I have a fair number of complicated
HTML tables that defy anything .NET can do. Using classic ASP I created
these tables (by string concatenation) by moving forward, and at times,
backward through a recordset (using a static cursor rather than a
forward-only cursor).

I can't seem to find any methods in .NET to move to a previous row in a
Dataset (e.g. MovePrev, MoveFirst). Am I trying to use the wrong object to
navigate through rows of data returned from a database query? Is there a
better way?

Thanks for any direction.


 
Reply With Quote
 
 
 
 
Eliyahu Goldin
Guest
Posts: n/a
 
      12-17-2006
To answer your question, a Dataset contains a collection of DataTables. A
DataTable contains a collection of Rows. You can use just an integer index
to navigate through it.

Generally speaking, asp.net is object-oriented, not procedure-oriented.
Several server controls, such as repeater, datalist and gridview, can
produces a databound html table with item (row) structure of any complexity.
Trying using asp.net in the classic asp way won't be productive and will be
always annoying you. Something like driving an airplane instead of flying
it.

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]


"Don Miller" <(E-Mail Removed)> wrote in message
news:O$(E-Mail Removed)...
> In my migration from ASP to ASP.NET 2.0, I have a fair number of
> complicated HTML tables that defy anything .NET can do. Using classic ASP
> I created these tables (by string concatenation) by moving forward, and at
> times, backward through a recordset (using a static cursor rather than a
> forward-only cursor).
>
> I can't seem to find any methods in .NET to move to a previous row in a
> Dataset (e.g. MovePrev, MoveFirst). Am I trying to use the wrong object to
> navigate through rows of data returned from a database query? Is there a
> better way?
>
> Thanks for any direction.
>



 
Reply With Quote
 
 
 
 
Don Miller
Guest
Posts: n/a
 
      12-17-2006
Thanks. I forgot entirely about integer indexes.

I appreciate your comments about the difference between the two platforms.
What I have found so far for HTML tables with ASP.NET they are "simply"
grids with one row representing one row of data albeit with ability to have
hyperlinks, formatting, etc.. My HTML tables may have several display lines
("rows") for just one row of data, that flex to two or three columns per
page of "rows" that are several display lines, all sorted by groups. I just
have not seen anything created with ASP.NET that comes even close.

I would love to see examples of how to do similar things with .NET
(something like below). Thanks again

(Typical .NET GridView)
Column 1 Header Column 2 Header Column 3
Row1Column1Data Row1Column2Data Row1Column3Data
Row2Column1Data Row2Column2Data Row2Column3Data
Row3Column1Data Row3Column2Data Row3Column3Data

(what I need)
Custom Header1 Custom Header3
Row1Column1Data Row3Column1Data
Row1Column2Data Row3Column2Data
Row1Column3Data Row3Column2Data

Custom Header2
Row2Column1Data
Row2Column2Data
Row2Column3Data


"Eliyahu Goldin" <(E-Mail Removed)> wrote in
message news:(E-Mail Removed)...
> To answer your question, a Dataset contains a collection of DataTables. A
> DataTable contains a collection of Rows. You can use just an integer index
> to navigate through it.
>
> Generally speaking, asp.net is object-oriented, not procedure-oriented.
> Several server controls, such as repeater, datalist and gridview, can
> produces a databound html table with item (row) structure of any
> complexity. Trying using asp.net in the classic asp way won't be
> productive and will be always annoying you. Something like driving an
> airplane instead of flying it.
>
> --
> Eliyahu Goldin,
> Software Developer & Consultant
> Microsoft MVP [ASP.NET]
>
>
> "Don Miller" <(E-Mail Removed)> wrote in message
> news:O$(E-Mail Removed)...
>> In my migration from ASP to ASP.NET 2.0, I have a fair number of
>> complicated HTML tables that defy anything .NET can do. Using classic ASP
>> I created these tables (by string concatenation) by moving forward, and
>> at times, backward through a recordset (using a static cursor rather than
>> a forward-only cursor).
>>
>> I can't seem to find any methods in .NET to move to a previous row in a
>> Dataset (e.g. MovePrev, MoveFirst). Am I trying to use the wrong object
>> to navigate through rows of data returned from a database query? Is there
>> a better way?
>>
>> Thanks for any direction.
>>

>
>



 
Reply With Quote
 
Eliyahu Goldin
Guest
Posts: n/a
 
      12-17-2006
Datalist is capable of arranging several items in a row. You can make an
item template containing a table with one column and 3 rows and databind the
cell in the first row to column 1 etc. The item template can also include an
html for the header, also databound if needed. In this way arrangement
Item1 Item2
Item3
is implemented with no problems.

For arrangement
Item1 Item3
Item2
you would probably need to re-order the rows in the dataset to bring it to
the first case.

Even if you don't want to use item templates, you can build an html table
dynamically out of server html controls for table, row and cell. It would be
still better than concatenating html elements to a string.

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]


"Don Miller" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Thanks. I forgot entirely about integer indexes.
>
> I appreciate your comments about the difference between the two platforms.
> What I have found so far for HTML tables with ASP.NET they are "simply"
> grids with one row representing one row of data albeit with ability to

have
> hyperlinks, formatting, etc.. My HTML tables may have several display

lines
> ("rows") for just one row of data, that flex to two or three columns per
> page of "rows" that are several display lines, all sorted by groups. I

just
> have not seen anything created with ASP.NET that comes even close.
>
> I would love to see examples of how to do similar things with .NET
> (something like below). Thanks again
>
> (Typical .NET GridView)
> Column 1 Header Column 2 Header Column 3
> Row1Column1Data Row1Column2Data Row1Column3Data
> Row2Column1Data Row2Column2Data Row2Column3Data
> Row3Column1Data Row3Column2Data Row3Column3Data
>
> (what I need)
> Custom Header1 Custom Header3
> Row1Column1Data Row3Column1Data
> Row1Column2Data Row3Column2Data
> Row1Column3Data Row3Column2Data
>
> Custom Header2
> Row2Column1Data
> Row2Column2Data
> Row2Column3Data
>
>
> "Eliyahu Goldin" <(E-Mail Removed)> wrote in
> message news:(E-Mail Removed)...
> > To answer your question, a Dataset contains a collection of DataTables.

A
> > DataTable contains a collection of Rows. You can use just an integer

index
> > to navigate through it.
> >
> > Generally speaking, asp.net is object-oriented, not procedure-oriented.
> > Several server controls, such as repeater, datalist and gridview, can
> > produces a databound html table with item (row) structure of any
> > complexity. Trying using asp.net in the classic asp way won't be
> > productive and will be always annoying you. Something like driving an
> > airplane instead of flying it.
> >
> > --
> > Eliyahu Goldin,
> > Software Developer & Consultant
> > Microsoft MVP [ASP.NET]
> >
> >
> > "Don Miller" <(E-Mail Removed)> wrote in message
> > news:O$(E-Mail Removed)...
> >> In my migration from ASP to ASP.NET 2.0, I have a fair number of
> >> complicated HTML tables that defy anything .NET can do. Using classic

ASP
> >> I created these tables (by string concatenation) by moving forward, and
> >> at times, backward through a recordset (using a static cursor rather

than
> >> a forward-only cursor).
> >>
> >> I can't seem to find any methods in .NET to move to a previous row in a
> >> Dataset (e.g. MovePrev, MoveFirst). Am I trying to use the wrong object
> >> to navigate through rows of data returned from a database query? Is

there
> >> a better way?
> >>
> >> Thanks for any direction.
> >>

> >
> >

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Free Moving Estimate, Local Movers, Long Distance Moving, PackingSupplies, Storage Rental, Home Moving, Apartment Moving, Office Moving,Commercial Moving linkswanted ASP .Net 0 01-06-2008 04:45 AM
How do Datasets manage to get deserialized as DataSets instead of a wsdl.exe-created proxy class? Francisco Garcia ASP .Net Web Services 3 04-13-2006 05:53 PM
How do Datasets manage to get deserialized as DataSets instead of a wsdl.exe-created proxy class? Francisco Garcia ASP .Net 2 04-13-2006 10:41 AM
How do Datasets manage to get deserialized as DataSets instead of a wsdl.exe-created proxy class? news.microsoft.com ASP .Net Web Services 0 04-12-2006 09:07 AM
How do Datasets manage to get deserialized as DataSets instead of a wsdl.exe-created proxy class? news.microsoft.com ASP .Net 0 04-12-2006 09:07 AM



Advertisments