How do we traverse through the records row-by-row in a database?

Hi guys,

I used a CurrencyManager in a windows form to traverse row-by-row on the records in a database. Can anyone help me out in using a similar feature in asp.net to traverse through the records row by row. Is there any in-built feature? I tried using a dataset to traverse through but I think it might be better to use an in-built feature as te code used in it might be optimised.

Thanks


Karthik Muthuswamy
Programmer Analyst
Chennai
0
karthik_muthuswamy
3/4/2008 3:12:44 AM
asp.net.presentation-controls 72751 articles. 3 followers. Follow

5 Replies
522 Views

Similar Articles

[PageSpeed] 25

Did you try using a gridview??


Click on 'Mark as Answer' if this post is helpful.

-- Randy
0
ratkinso
3/4/2008 3:35:11 AM

If you want to traverse row by row in the database itself use a curser. If youwant to do it in the dot net, then u can use dataset or a datareader to read rows and work on one row at a time


Vikram
www.vikramlakhotia.com


Please mark the answer if it helped you
0
vik20000in
3/4/2008 3:35:12 AM

vik2000in: But isnt there a feature like CurrencyManager, I think using a datareader or a dataset would not be good when the performance comes into place.

ratkinso: Am using textboxes and dropdownlists to traverse through the records one by one. Am using a datagrid in a separate page as gridview is available only in asp.net 2.0.

Is there an alternative to CurrencyManager in ASP.Net?

Thanks for the replies.


Karthik Muthuswamy
Programmer Analyst
Chennai
0
karthik_muthuswamy
3/4/2008 3:55:02 AM

In that case I would normally use a datareader....  sorry I don't have a better answer for you.


Click on 'Mark as Answer' if this post is helpful.

-- Randy
0
ratkinso
3/4/2008 1:10:38 PM
Thanks anyways ratkinso. I still used a datareader and it still worked.
Karthik Muthuswamy
Programmer Analyst
Chennai
0
karthik_muthuswamy
3/4/2008 1:32:04 PM
Reply:

Similar Artilces:

Add new controls to a gridview row; when editing that row using the edit row feature in the gridview control.
Hi all  I have a questions that looks hard / complex to me, and i know you can help me in this. Q {  I have row in a Gridview and i have an edit option to it. I press the edit button, to edit the values in that row and update data all the way back to the database. Now when i press the edit button, i want a drop down list to be displayed that contain values for a particular field in my grid view. (for now only plain text boxes appear.) } I hope you understand my question, all i need to do is replace the text box controls with a dropdown list when i am editing a row in ...

(Fwd) How to loop through a database, row by row, and select and update one row at a time
----- Forwarded message from Troy Mulder <mulderta@gmail.com> ----- Date: Mon, 12 Apr 2010 17:48:37 -0400 From: Troy Mulder <mulderta@gmail.com> To: Tim.Bunce@pobox.com Subject: How to loop through a database, row by row, and select and update one row at a time Hello Tim (is it Dr. Bunce?), My name is Troy Mulder, and I am trying to get a perl script to interface with a PostgreSQL database. I am trying to step through each row of the database, and read one column of the row, and update another column of the row. When I follow the online tutorial a...

First Row, Next Row, Prior Row, Last Row
I have a SQL Anywhere 7.0 Database, have a table Product_detail which contains Column Name Datatype width Null Default batch_id char(10) No None prod_id Integer No None employee_id Integer No None quantity Integer No None price Numeric (14, 2) No None Its primary key is batch_id I have a Freeform Datawindow with this table I want to provide the first row, next row, prior row and last row Ho...

ask database on deleting if some row references another row (= database.Can_I_delete_some_table_row?)
Hello, is there way to ask database if I can delete some table row? I have tables with foreign key constraints and I need "try delete" some row in this table. But there is possibilitythat the row is referenced by another table, so it throws an exception.. I now that I can use in my .net code try, catch statement to catch unpossibility of execution sql statement...but It makes me feel that this is "hard" way (throwing exception, catching..) -- maybe here is another more efficient way.. I need do st.like that: IDbConnection connection = Connection;// ask database ...

How to get data from database row by row
I try to get data from a database row by row, I am using DataReader, the return result is not I expected, don't know how to solve it. Here is my sample code: --------------------------------------------Dim commandText As String = "select * from customer "Dim con As New OleDbConnection("Data Source=c:\company.mdb;Persist Security Info=False; Provider=Microsoft.Jet.OLEDB.4.0;")Dim Cmd As New OleDbCommand(commandText, con)Dim reader As OleDbDataReader = Cmd.ExecuteReader()             Using con       &nbs...

Scroll row by row in a datawindow control
Hi. I have a tabular datawindow object with one group and all my data is displayed in the header group and the detail band is not visible. when i run my application and i want to scroll the data the datawindow control scrolls the data page by page and i need it row by row. How can i do this? thank you in advanced You will have to move your data into the detail band. "Row" in datawindow is contents of the detail band. Igor "Fernando Pe�a" <Fernando_Pe0xL1A4za> wrote in message news:943886BF87C590640077873785256A65.0077874785256A65@webforums.....

How do I "row-wrap" ? i.e., have 2 rows of headers, and 2 rows in grid for each data record?
Hi I have built a view in Sql Server, and built my Sql Data Source, and everything looks good... I have my data grid populating nicely. But, I want the headers and rows to wrap - not inside each cell, but to fit the page. Let's say I have 10 columns, and only 5 will fit in the width of a webpage.  I would want the headers to wrap, so there are two rows of headers, then each data record would fill 2 rows in the grid. Example:  <headers> Last Name................First Name.............. Middle Name.............DOB............SSN............. <end of this row in grid>...

DataSet rows being deleted, but after the update , the sql database is not updated. The delete rows still in the database.
 Stepping thru the code with the debugger shows the dataset rows being deleted.   After executing the code, and getting to the page presentation. Then I stop the debug and start the page creation process again ( Page_Load ).    The database still has the original deleted dataset rows. Adding rows works, then updating works fine, but deleting rows, does not seem to work.   The dataset is configured to send the DataSet updates to the database. Use the standard wizard to create the dataSet.     cDependChildTA.Fill(cDependChildDs._ClientDependentC...

How To: Reference controls in footer row from an item row
I'm familiar with using the e.Item.FindControl command when manipulating controls from an item row or footer row when you are actually in (editing) that row. I'm also familiar with determining what "Type" of row I'm in. What I'm having troubles with is referencing a control in the footer row of a datagrid while I'm actually in (editing) an item row. Can this be done? Thanks Mike...

ADO.net problem: i can not view image data for the rest of my table rows except the image for the first row but i can read all the other non image fields for all rows.
Hi i have a table with the following fields imgid............int imgdata........image imgtitle.........varchar(max) imgType........varchar(max) imgLength.....bigint incident_id.....int i have no problem with uploading the image but viewing the uploaded image(s) in a gridview has caused me great pain. The probelm is i have two pages. page1 grabs the image to display and page2 has a gridview that displays the grabed image. I wanted to have an sql statement like SELECT * FROM mytable WHERE incident_id=someValue. IF i have 5 records in this table and i view page2 ...

returning the database row ID from a selected row from a GridView
Hi I'd like to be able to display a gridView with rows of data, and when the user selects a row, somehow return the ID value for the respective row from the database, not the row in the gridView - if that makes sense. If possible, I don't want the ID displayed in the gridView. Thanks for any helpRichard Use DataKeyNames and SelectedDataKey Property of GridViewSomnath Mali.NET Developer , Pune INDIA.Please Mark As Answer If my reply helped you. I’m not sure what it is your describing; could you elaborate? ThanksRichard 1. <asp:GridView DataKeyNames="ProductID" Al...

read data from database row by row in WebForm.aspx
The following task is going to be coded in WebForm.aspx. I would like to read data from a database table row by row and execute some codes based on the data retrieved from each row. For example, there are 4 fields on a table called Image_Tbl. Those fields are Image ID, Image Path Name, X-Coordinate, and Y-Coordinate. Data stored on the table will be: Image ID Image Path Name X-Coordinate Y-Coordinate ImgBtnLight image\light.gif 192px 92px ImgBtnAC image\ac.gif 256px 152px How should I make a loop saying before en...

retrieving from row # to row #.
I have over 750 000 rows to retrieve from a table using a datawindow, but my system can only handle approx 30 000 rows and I would like to start from the end of the table. Is it possible to set the row numbers to retrieve? For example, start the retrieve from row 750 000 and stop at row 720 000. There must be a way. thanks, Vern what backend are you using? <Vern> wrote in message news:6BA241541AAD7F2F0063357385256C40.0063358685256C40@webforums... > I have over 750 000 rows to retrieve from a table using a datawindow, but > my system can only handle approx 30 ...

adding a blank header row /row above the header row
is it possible to add a blank row above the header row in gridview for adding some links and buttons the links will respond to thae data in the grid and the buttons are for login / regisration etc....  if yes how it can be done or how do i achieve it. Its better that u create a table with a single row with columns matching the GridView columns. Set the table width same as the GridView width. This will make the GridView Look as if there is a row above its header.Please do not forget to click Mark As Answer on the post that helped you. Regards,Iam Srikanth Reddy....

Web resources about - How do we traverse through the records row-by-row in a database? - asp.net.presentation-controls

Sifting Through An iPhone's Geo Data, Row By Row
NPR's senior director of technology digs into the Geo Data that is captured and recorded in iPhones and iPads.

Resources last updated: 12/25/2015 6:40:27 AM