I am trying to tie a column in a database to a dropdown list, but
having very little luck.
The table is bound to the .aspx page via oledbadapter1 and
oleconnection1, but when I try to create a dataset from it and use one
column of the table, it doesnt work. Either I get an error saying the
type is not a recordset, or it just wont fill the combobox. Please
Help
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
Dim DATechNo As OleDb.OleDbDataAdapter = New
OleDb.OleDbDataAdapter
Dim DSTechNo As Data.DataSet = New Data.DataSet
Dim dc As DataSet = CType(DDTechNo.DataSource, Data.DataSet)
Dim RS As String
RS = "SELECT * FROM TechNumber.TechNumber"
DDTechNo.DataSource(me.OleDbDataAdapter1.Fill(dc,1 ,,
TechNumber)
DDTechNo.DataBind(TechNumber)
OleDbConnection1.Close()
OleDbConnection1 = Nothing
The name of the Table and column are both TechNumber. In The Line
DDTechNo.DataSource(me oldedbdataadapter1.Fill(dc, 1, , TechNumber)
TechNumber is supposed to be the table I am using, but ASP.NET doesnt
recognize it.
This project is a conversion of an ACCESS 2003 database with forms to
an ASP.NET web based database using VB 2003.
Any help will be much appreciated.