Wrox Programmer Forums
|
VB.NET 2002/2003 Basics For coders who are new to Visual Basic, working in .NET versions 2002 or 2003 (1.0 and 1.1).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB.NET 2002/2003 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 21st, 2004, 06:16 PM
Authorized User
 
Join Date: Apr 2004
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default While not EOF

I want to use a While Not EOF() to read some data.

I'm not sure what goes in the (). It seems to want an integer, but where is the integer coming from?

I really don't want ot use a a Do Loop.

 
Old April 21st, 2004, 08:53 PM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

What object are you trying to use to read the data? You should use a DataReader for read only data operations. This uses a different set of methods for iterating thru the results.

Depending on what you want to do with the obtained data, you might be able to just directly databind the result set object (DataReader or other) to a control (like a data grid) that will handle the looping for you.
 
Old April 22nd, 2004, 07:36 AM
Authorized User
 
Join Date: Apr 2004
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I want to read a table in access and populated text boxes on a form with the matches.

 
Old April 22nd, 2004, 04:14 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default

If you are using a DataTable object, you can do:

For Each objRow As DataRow In objTable.Rows
    'Loops through each row
Next

Brian





Similar Threads
Thread Thread Starter Forum Replies Last Post
EOF stealthdevil Access VBA 2 December 21st, 2006 12:41 PM
C#: EOF using StreamReader shazia1 VS.NET 2002/2003 0 August 16th, 2005 04:25 AM
HELP WITH EOF chiraagb Classic ASP Databases 12 May 6th, 2004 04:51 AM
EOF in ODBC spraveens PHP Databases 3 March 29th, 2004 12:17 AM
eof new BOOK: Beginning Visual C++ 6 0 October 9th, 2003 07:33 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.