
ADO.NET with ASP.NET using VB.NET
Quote:
> I have an aspx page that is connecting to a microsoft
> access database. I'm connecting fine to the database. I
> can run my requested SQL statement. I return one field
> from a single record out of my recordset. At this point
> all the texts I've seen have me Bind this information to a
> datagrid. What I need to do is capture this single piece
> of information into a variable. Can anyone assist me with
> this?
Hi,
You just need to create a variable and get the value from the recordset into
the variable.
Something like:
Dim str As String
Dim reader as OldDbDataReader
' Get the data from the database
str = reader.Item("FIELD_NAME")
(I'm not a VB expert so I added the VB group incase someone has better
code).
Peter
--
This must be the disclaimer I waited years to read:
http://www.*-*-*.com/