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 end of the database table records and for each row of data, execute the some codes. Thank you for your time.

Thanks,

Ester
0
ester
6/4/2004 11:05:59 AM
asp.net.web-forms 93655 articles. 6 followers. Follow

0 Replies
574 Views

Similar Articles

[PageSpeed] 38

Reply:

Similar Artilces:

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 ...

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...

Why does it not let me type data in my database fields and gives me error "No row was updated, the data in row 1 was not committed?
Hi, I'm typing example records in my database fields for username, last name, firstname, city, state, etc directly into the database field but when I try to save it it says:  No row was updated. The data in row 1 was not committed.Error Source: .NetSqlClient Data Provider.Error Message: String or binary data would be truncated.The statement has been terminated.Correct the errors and retry or press ESC to cancel the change(s) Basically I'm just typing data into the fields but it won't allow me to save them.    The data types are all saved as...

C#.NET WEB APPLICATION
hei guys, i need help on my application, i'm using C#.NET as front-ed and SQL as back-end, aside from a datagrid, i want to display my data using textboxes and not a datagrid, i can do it using Visual Basic 6 but since i'm a newbee at C#.NET i don't know how to do it, specially the codes, can anyone help me with it? thank you in advance! If you are doing windows development, i would suggest using 'DataForm wizard' (Use Solution Explorer-->Rightclick project-->Add new Item-->New DataForm). It will guide you through steps. If you are doing web apps. Use quickstart to learn them. h...

How to access the last row of data and find out how many rows are in that database?
I have a database with one column that has 3 rows with numbers 1, 2, 3. I want to know how to access the last row of the database (which stores the number 3) and find out what number it stores (in this case the number 3). But the goal is so that when I add a new row to the database from aspx page, I will know which number comes next after the last row that is already in the database. Also is there some way to find out how many rows in total the database currently stores. Because when the user is exiting my site I want to find out how many rows there are in total and then subtract 3 from...

Displaying two rows of database column data in one row of datagrid
Hello, I am trying to display two rows of an access column on one row of datagrid. Is that possible? Example of my intended datagrid: courseNo of course1courseNo of course2 courseNo of course3courseNo of course4 here's the HTML view of my aspx file: <Asp:datagrid id="DataGrid1" style="Z-INDEX: 101; LEFT: 104px; POSITION: absolute; TOP: 40px"    runat="server" AutoGenerateColumns="False" Height="320px" Width="488px">    <Columns>     <asp:TemplateColumn>      &...

Value in Web Form to Delete Database Row
Hi everyone,I have a problem and was hoping someone might be able to help me with it.Basically I have a label control that displays an ID number. I also have an MS SQL database with a table called Images with a primary key called ID. What I need to do is dependent upon the label control value delete the corresponding row in the database table.e.g. Label Value in web form = 4. So from this I need to delete the row in the Database which has the Primary key ID = 4.I am coding in VB as I don't know any C#. Any help greatly appreciated.ThanksDaniel  Dan_no7: Hi everyone, I have a p...

Arranging data on multiple rows into a sigle row (converting rows into columns)
Hello, I have a survey (30 questions) application in a SQL server db. The application uses several relational tables. The results are arranged so that each answer is on a seperate row: user1   answer1user1   answer2user1   answer3user2   answer1user2   answer2user2   answer3 For statistical analysis I need to transfer the results to an Excel spreadsheet (for later use in SPSS). In the spreadsheet I need the results to appear so that each user will be on a single row with all of that user's answers on...

how to insert a row of data into database using web service
As the title, how to insert a row of data into a table through a webservice ? (visual basic 2005 + sqlserver) in this project, there is a winform include some labels, textboxes, and buttons. User can type in these controls and then press a button, all the data will be inserted into a table of local database (for example, northwind.customers) using a web service. I only know using ado.net (dataset) Thanks!   Create your dataset in a webservice project. Using a webmethod to expose your dataset ...[WebMethod()] public MyDataSet GetDataSet() {....} U...

(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...

inserting a single row in database using 2 webforms data
Hi all,  I have one registration form,cash and check  forms means i have 3 webforms.       first in registration form i'm inserting data through textboxes into .mdb file and then i'm navigating to Cash webform to insert the cash.After submiting this amount its going fine and inserting to same .mdb file of cash feild  BUT in different row..    I want that Cash amount  also in the same row   means  that  that is that perticular registered user's cash amount. I having feilds like this: FN&n...

inserting a single row in database using 2 webforms data
Hi all,  I have 3 webforms : Registration form,Check form,Cash form I have the .mdb file like this  :  FN  LN  Address  State  Zip  Telephone  Cah  Check first in registration form after clicking submit button FN,LN.... are inserting into the .mdb file and then i'm navigating to Default .aspx in that  i'm selectin gCash form .  In that form after submiting cash amount its going fine means its inserting into the same .mdb file  BUT in another row    BUT I want that amount in the same row means that is t...

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...

How to update Data of First row when I delete Data of Second row?
 assume my Table's Columns looks like below1  ,   Annie,   History, pass, 12  ,   Colin,   Math   , Pass, 17  ,   Annie,   History, Fail, 011 ,   Colin,   Math   , Fail, 0you can see the No1 and No7 with same people AnnieWhen I delete the No7's Data I want to update which last 2 columns "Fail" and "1" to No1so After I delete Row of No.7 the result will looks like below1  ,   Annie,   History, Fail, 0 ( update this row'...

Web resources about - read data from database row by row in WebForm.aspx - asp.net.web-forms

Database - Wikipedia, the free encyclopedia
... requiring information. For example, modelling the availability of rooms in hotels in a way that supports finding a hotel with vacancies. Database ...

Database - Wikipedia, the free encyclopedia
A database is an organized collection of data . The data are typically organized to model aspects of reality in a way that supports processes ...

ERISA and All Claim databases
... laws, on the books in 18 states, requiring self-insured employers to report data about the prices they pay to “all payer claims databases.” ...

Sanders’ campaign looses access to N.H. Democratic voter database - The Boston Globe Sanders’ campaign ...
... the presidential campaign of US Senator Bernie Sanders has been denied access to the New Hampshire Democratic Party’s valuable voter database ...


Under pressure, DNC restores Bernie Sanders campaign's access to their database - Videos - CBS News
A strange twist in the race for the democratic presidential nomination: the campaign of Vermont Senator Bernie Sanders has filed a complaint ...

Over 680TB of data exposed in MongoDB databases
There are at least 35,000 publicly accessible and insecure MongoDB databases on the Internet, and their number appears to be growing. Combined ...

EFF confirms that the DEA has deleted its phone call database
Earlier this year, it was revealed that the NSA's massive surveillance program had a precursor: the Drug Enforcement Administration's USTO, which ...

MacKeeper Leak Highlights Danger of Misconfigured Databases
The Shodan port-scanning service finds at least 35,000 MongoDB databases accessible without a password.

OracleVoice: Oracle Challenges SAP On In-Memory Database Claims
Companies that run SAP’s applications should know that most of those applications can perform much better on Oracle Database than on any other ...

Resources last updated: 12/22/2015 8:31:17 PM