473,385 Members | 1,830 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

A simple data Table with HTML

Des
I am trying to get to grips with .net database. I have frequently used
record sets with web pages in html. Using code like
While rs.eof = false
<td><%=rs("Name")%></td><td><%=rs("Address")%></td>
Rs.movenext

This was simple No I seem to have to write

<td><%tblProducts.Rows(0)("Quantity")%></td>

I know Rows(1) is the next record and I could have a variable here, but
is there no EOF and no MoveNext anymore. All the documentation in books
(Including Microsoft explain how great it is to use with the data
control. But if I don't use the data control I am up the creek
without a paddle. I have checked extensively for this information
including MSDN without success.
Desmond.

Feb 27 '06 #1
2 1099
There is a hundred different choices, but you can iterate through the
DataRows of the Datatable using a foreach.

DataSet ds = new DataSet();
adapter.Fill(ds);

foreach(DataRow row in ds.Tables[0].Rows)
{
name = row["Name"];
address = row["Address"];
}

Have a read of this, its a very simple to follow example you could probably
fit your table code around.

http://msmvps.com/blogs/simpleman/ar.../24/54832.aspx

--
Regards

John Timney
Microsoft MVP

"Des" <de*********@aol.com> wrote in message
news:11**********************@i39g2000cwa.googlegr oups.com...
I am trying to get to grips with .net database. I have frequently used
record sets with web pages in html. Using code like
While rs.eof = false
<td><%=rs("Name")%></td><td><%=rs("Address")%></td>
Rs.movenext

This was simple No I seem to have to write

<td><%tblProducts.Rows(0)("Quantity")%></td>

I know Rows(1) is the next record and I could have a variable here, but
is there no EOF and no MoveNext anymore. All the documentation in books
(Including Microsoft explain how great it is to use with the data
control. But if I don't use the data control I am up the creek
without a paddle. I have checked extensively for this information
including MSDN without success.
Desmond.

Feb 27 '06 #2
Des wrote:
I am trying to get to grips with .net database. I have frequently used
record sets with web pages in html. Using code like
While rs.eof = false
<td><%=rs("Name")%></td><td><%=rs("Address")%></td>
Rs.movenext

This was simple No I seem to have to write

<td><%tblProducts.Rows(0)("Quantity")%></td>

I know Rows(1) is the next record and I could have a variable here, but
is there no EOF and no MoveNext anymore. All the documentation in books
(Including Microsoft explain how great it is to use with the data
control. But if I don't use the data control I am up the creek
without a paddle. I have checked extensively for this information
including MSDN without success.
Desmond.


tblProducts.rows.count should give you the number of rows. So you could
put that in a for-next loop.
--
Rinze van Huizen
C-Services Holland b.v
Feb 27 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Dariusz | last post by:
I am a beginner in PHP and MySQL, and am working through a book and various online tutorials on PHP and MySQL and now stuck - installed everything on "localhost" and it all works fine. My question...
1
by: Freddy Morel | last post by:
My objective is to make a two columns table from an XML-data file. I do not want to use XSL, so sorting and else is not important for the moment. I have this working in a table:...
3
by: cv | last post by:
Hi all, I have to copy two set of data from 2 files(notepad/excel) say, products and their corresponding prices to list/textarea/table. I should be able to retrieve the product and corresponding...
1
by: Dick Rosser | last post by:
Greetings, I have scanned all the script repositories to no avail trying to find what would be, I thought, a fairly simple script. What I am trying to achieve is as follows, perhaps someone can...
7
by: J. Hall | last post by:
Hi dudes, Got a simple webpage, with three numeric text input boxes, the idea being that the user is asked to insert percentages of their business around the world... UK, Europe, Other ...
9
by: Pete | last post by:
Does anyone have a simple html vbscript or other type of snippet they can share that appends a record to a access database via ADO or DAO? I would like to allow users that don't have Microsoft...
3
by: John Baker | last post by:
Hi:7 Newby here to ASP, and using the ASP.NET Web Matrix development tool. While that tool looks great for a Newby, I have run into a snag. I have an HTML Text Box which I have named HireInput,...
27
by: one man army | last post by:
Hi All- I am new to PHP. I found FAQTS and the php manual. I am trying this sequence, but getting 'no zip string found:'... PHP Version 4.4.0 $doc = new DomDocument; $res =...
5
by: olaamussah | last post by:
Hi, i just started learning perl which i would use for my uni. project unfortunately. Well, this is a simple user login page i tried to create but i cant get it to work. Can someone please check this...
9
by: =?Utf-8?B?S2VsbHk=?= | last post by:
I am from classic asp and learning asp.net. In the past, once I have a recordset retrieved, I can use it wheneve and wherever I want. For example, I know my recordset contains something like...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.