Rat
Well-known member
I've attached the following file, the data loads in from the database, but i have a problem .. it doesn't immediately show the columns and it's contents, i have to click a "+" and the Table name to get there ... how do i fix this ?
I want to make it directly go to show the columns and contents.
Here's the code ...
I want to make it directly go to show the columns and contents.
Here's the code ...
VB.NET:
Private Sub frmDBExplorer_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Try
Dim connString As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Application.StartupPath & "\DB\DB.mdb"
Dim myConnection As OleDbConnection = New OleDbConnection
myConnection.ConnectionString = connString
Dim DataAdapter As OleDbDataAdapter = New OleDbDataAdapter("Select * from XML", myConnection)
Dim DataSet As DataSet = New DataSet
DataAdapter.Fill(DataSet, "XML")
dgBrowse.DataSource = DataSet.DefaultViewManager
Catch ex As Exception
MsgBox(ex.Message + ex.Source, MsgBoxStyle.Critical + MsgBoxStyle.OKOnly, "Exception Message")
End Try
End Sub