
Signature
Mark Rae
ASP.NET MVP
http://www.markrae.net
>> Do Until RecSet.EOF()
>> Debug.Print RecSet.Fields("Whatever").Value
>> RecSet.MoveNext
>> Loop
>
> Are you trying to use ADO instead of ADO.NET...?
That code was just an example of what I am used to doing (in VB6 and VBA),
not what I'm doing now. Yes, I'm using ADO.NET. The link you posted was
interesting, but it still relied on binding the data source to a control, in
this case the DataGrid. I do NOT want to bind to any control. All I want to
do is a FOR loop iterating through the returned records one at a time,
examining the various fields of each record.
I would be very grateful if you could post some working code that iterates
through the result records of a SELECT without (!) binding to any control.

Signature
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting
www.cpearson.com
(email on the web site)
>> Do Until RecSet.EOF()
>> Debug.Print RecSet.Fields("Whatever").Value
[quoted text clipped - 8 lines]
> Instead, just use ADO.NET to fetch a DataSet from your Jet database...
> http://www.asp101.com/articles/jay/adodotnet/part3.asp
Mark Rae [MVP] - 04 Jul 2007 02:22 GMT
>>> Do Until RecSet.EOF()
>>> Debug.Print RecSet.Fields("Whatever").Value
[quoted text clipped - 12 lines]
> I would be very grateful if you could post some working code that iterates
> through the result records of a SELECT without (!) binding to any control.
There are *heaps* of examples of how to do this in MSDN and on Google etc,
but...
string strConnectionString = "<...connection string to your Jet
database...>";
string strSQL = "<...SELECT * FROM Table WHERE This = That...">;
using (OleDbConnection objOleDbConnection = new
OleDbConnection(strConnectionString))
{
objOleDbConnection.Open();
using (OleDbCommand objOleDbCommand = new OleDbCommand(pstrSQL,
objOleDbConnection))
{
using (OleDbDataAdapter objDA = new
OleDbDataAdapter(objOleDbCommand))
{
using (DataSet objDataSet = new DataSet())
{
objDA.Fill(objDataSet);
objOleDbConnection.Close();
foreach (DataRow objRow in objDataSet.Tables[0].Rows)
{
// objRow["Field1"].ToString();
// objRow["Field2"].ToString();
// objRow["Field3"].ToString();
// etc
}
}
}
}
}

Signature
Mark Rae
ASP.NET MVP
http://www.markrae.net
Juan T. Llibre - 05 Jul 2007 15:15 GMT
Please join me in congratulating Mark Rae, who was just named ASP.NET MVP
for the excellence and community spirit he has shown in his prolific,
and technically accurate, answers which have helped hundreds of frequenters
to the microsoft.public.dotnet.framework.aspnet newsgroup.
Congratulations, Mark !
Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
======================================
Mark Rae [MVP] - 05 Jul 2007 15:28 GMT
> Congratulations, Mark !
Aw shucks!
Gracias, jefe...
A sus ordines!

Signature
Mark Rae
ASP.NET MVP
http://www.markrae.net
Alvin Bruney [MVP] - 05 Jul 2007 16:39 GMT
I'll join in the chant. I think Mark is a great addition to the community!

Signature
Regards,
Alvin Bruney
------------------------------------------------------
Shameless author plug
Excel Services for .NET is coming...
https://www.microsoft.com/MSPress/books/10933.aspx
OWC Black Book www.lulu.com/owc
Professional VSTO 2005 - Wrox/Wiley
> Please join me in congratulating Mark Rae, who was just named ASP.NET MVP
> for the excellence and community spirit he has shown in his prolific,
[quoted text clipped - 8 lines]
> foros de asp.net, en español : http://asp.net.do/foros/
> ======================================