Need some help with asp.net and fill labels from a database.

  • Thread starter Thread starter Morten
  • Start date Start date
M

Morten

Hi.

I have just began to use vb.net/ asp.net.
Now I am trying to undertand ado.net and use of it.

The datagrid it seems I got right but how do I "fill" e.g. a label.
Previous I dis label.caption= rs!something.

Now I have
Dim custNmAdapter As New OleDb.OleDbDataAdapter("SELECT Nm from myTable
where id=1")
Dim dsCustNm As DataSet = New DataSet()
custNmAdapter.Fill(dsCustNm, "Intelle_CustNm")
So if anyone please could show me how I can get data into my label I would
be fextreamly happy.
label.text=???

Thanks
Morten
 
Hi,

You just have to access with the the rows in the dataset.
Have a look at the Dataset class
dsCustNm.Tables["Intelle_CustNm"].Rows[0].Columns
["columnName"]
 
Thanks.

U got me on track again.

:) Morten

Anuradha said:
Hi,

You just have to access with the the rows in the dataset.
Have a look at the Dataset class
dsCustNm.Tables["Intelle_CustNm"].Rows[0].Columns
["columnName"]

-----Original Message-----
Hi.

I have just began to use vb.net/ asp.net.
Now I am trying to undertand ado.net and use of it.

The datagrid it seems I got right but how do I "fill" e.g. a label.
Previous I dis label.caption= rs!something.

Now I have
Dim custNmAdapter As New OleDb.OleDbDataAdapter("SELECT Nm from myTable
where id=1")
Dim dsCustNm As DataSet = New DataSet()
custNmAdapter.Fill(dsCustNm, "Intelle_CustNm")
So if anyone please could show me how I can get data into my label I would
be fextreamly happy.
label.text=???

Thanks
Morten


.
 
Back
Top