D
Dan
Hi,
I'm learning asp.net 2.0 and i get this error:
"Data source is an invalid type. It must be either an IListSource,
IEnumerable, or IDataSource"
My code:
Dim a As GridView
Dim oConnection As OleDbConnection
oConnection = New OleDbConnection()
Dim comd As OleDbCommand
Dim sql As String
Dim a as GridView
Dim sConnectionString As String
sConnectionString = "Provider = Microsoft.Jet.OLEDB.4.0; Data Source
= c\test.mdb"
oConnection.ConnectionString = sConnectionString
oConnection.Open()
sql = "SELECT ...;"
comd = New OleDbCommand(sql, oConnection)
a = New GridView
a.DataSource = comd
a.DataBind()
oConnection.Close()
Thanks
Dan
I'm learning asp.net 2.0 and i get this error:
"Data source is an invalid type. It must be either an IListSource,
IEnumerable, or IDataSource"
My code:
Dim a As GridView
Dim oConnection As OleDbConnection
oConnection = New OleDbConnection()
Dim comd As OleDbCommand
Dim sql As String
Dim a as GridView
Dim sConnectionString As String
sConnectionString = "Provider = Microsoft.Jet.OLEDB.4.0; Data Source
= c\test.mdb"
oConnection.ConnectionString = sConnectionString
oConnection.Open()
sql = "SELECT ...;"
comd = New OleDbCommand(sql, oConnection)
a = New GridView
a.DataSource = comd
a.DataBind()
oConnection.Close()
Thanks
Dan