G
Guest
Can anyone tell me how to pull data from a dataset?
In my Page_Load function, I use the following code:
Dim str As String
Dim ds As System.Data.DataSet
Dim dt As System.Data.DataTable
Dim dr As System.Data.DataRow
Dim dc As System.Data.DataColumn
ds = UserTypeQueryMethod()
For Each dt In ds.Tables
For Each dr In dt.Rows
For Each dc In dt.Columns
if dr(dc) = "owner" then
msgbox(dc.DefaultValue.ToString())
if dc.DataType <> DBNull then
'GET THE VALUE OF THE COLUMN IN A ROW IN A
TABLE
end if
end if
Next dc
Next dr
Next dt
In my Page_Load function, I use the following code:
Dim str As String
Dim ds As System.Data.DataSet
Dim dt As System.Data.DataTable
Dim dr As System.Data.DataRow
Dim dc As System.Data.DataColumn
ds = UserTypeQueryMethod()
For Each dt In ds.Tables
For Each dr In dt.Rows
For Each dc In dt.Columns
if dr(dc) = "owner" then
msgbox(dc.DefaultValue.ToString())
if dc.DataType <> DBNull then
'GET THE VALUE OF THE COLUMN IN A ROW IN A
TABLE
end if
end if
Next dc
Next dr
Next dt