Data Grid for confermation screen

Morn

Active member
Joined
Dec 4, 2006
Messages
40
Programming Experience
Beginner
I have managed to get to the point in a project where I must display a summery of a booking.

The details that I have stored in an access database are as follows:

First Name, Surname age and activity

I need to get these to display in a data grid so that the user can confirm the booking.

This is the code that I have so far, what I need is to get the data from the dataset and into the data grid.

VB.NET:
' create a connection string 
        Dim connString As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\\holiday.mdb"
        Dim myConnection As OleDb.OleDbConnection = New OleDb.OleDbConnection()
        myConnection.ConnectionString = connString
        ' create a data adapter 
        Dim da As OleDb.OleDbDataAdapter = New OleDb.OleDbDataAdapter("Select * from tblTraveler", myConnection)
        ' create a new dataset    
        Dim ds As DataSet = New DataSet()
        ' fill dataset 
        da.Fill(ds, "Customers")
        ' write dataset contents to an xml file by calling WriteXml method 
        ' Attach DataSet to DataGrid 
        DataGridView1.DataSource = ds.DefaultViewManager
Any one?
 
Back
Top