Terry,
ADO.net actually has 2 object that 'replace' the
functionality of the recordset. The first option is the
one I think you have mentioned, the DataAdapter. Using the
DataAdapter you can fill a dataset with the result from a
query (data is all loaded Client side in a single step).
The other option is the DataReader. You can use the
DataReader to do the same sort of record by record loop
that the adodb.recordset allowed.
a brief sample (in vb.net):
**************************
dim cmd as new SQLClient.SQLCommand
(SomeSQLString,SomeConnecion)
dim dr as SQLClient.SQLDataReader
dr = cmd.executeReader
do while dr.read()
' right here you can place the data into your textboxes
or whatever
textbox1.text = dr.item("fieldName")
loop
dr.close
**************************
Unlike the recordset, be careful to ALWAYS close your
datareader. It locks up the connection until you do.
Kirk
-----Original Message-----
Hello,
I'm new to ADO .NET and I'm still thinking back to ADO in
VB6 usingrecordset. Now I have added the ADODB reference so I can
still use if forsome of the program that I'm programming but I would like
to get into ADO..NET.
Here's my question. In VB6 you could call a single field:
textbox = rs("field")
can you do this in ADO .net???
Now I know about the FILL function for ADO .net but
there's a couple thingsthat I'd like to do but just using 1 or 2 of the fields
not all of them.
---------------------------------------------
Terry Knight
Computer Systems Technologist
F: 206.260.0704
www.tforce.ca
.