DataGrid and MS Access database

G

Guest

I have a datagrid on a web form and I am setting the datasource in Page_Load
Event and there are no errors generated, I can interrogate the DataTable and
it returns row count, column count, data in rows, etc., but the DataGrid
itself will NOT appear at all on the web form. Anybody know why?

Thanks.

Joe
**********************

Dim oConn As New OleDbConnection
oConn.ConnectionString = ConnString 'generated outside Page_Load
oConn.Open()

Dim sSQL As String = "select * from REGISTRATION"

Dim da As OleDbDataAdapter = New OleDbDataAdapter(sSQL, oConn)

Dim ds As DataSet = New DataSet
da.Fill(ds, "REGISTRATION")
Me.DataGrid1.DataSource = ds.Tables("REGISTRATION")
lblStatus.Text = ds.Tables(0).TableName & ";Columns = " &
ds.Tables(0).Columns.Count.ToString
lblStatus.Visible = True
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top