DataBind

  • Thread starter Thread starter André Almeida Maldonado
  • Start date Start date
A

André Almeida Maldonado

How can I bind data with a DropDownList... I use a code that return no
errors but don't populate de DropDownList... See the code:


Dim conBanco = New
SQLConnection("server=(local)\NetSDK;database=Digiexpress;Integrated
Security=SSPI")
Dim cmdCommand As SqlCommand = conBanco.CreateCommand()

conBanco.open()

Dim dtrDataReader as SqlDataReader


cmdCommand.CommandText = "SELECT usuanome FROM usuarios"

dtrDataReader = cmdCommand.ExecuteReader()

drpLigaAten.DataSource = dtrDataReader
drpLigaAten.DataBind()

dtrDataReader.Close()
 
try to use dataset/datatable/dataview instead of datareader.

I think, datareader does not implement ilistsource interface.

Rajesh Patel.
 
But just for populate a DropDownList I have to create a DataSet, DataTable,
DataView????

This will use too much memory, doesn't it???

Thank's...
 
Back
Top