Dim stSQL As String
stSQL = "SELECT BookingID, Customer, Seat FROM tblBookings"
Dim stConString As String
stConString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Users\GT\Documents\Visual Studio 2010\Projects\Online Movie Reservation System.accdb"
Dim conBookings As OleDbConnection
conBookings = New OleDbConnection
conBookings.ConnectionString = stConString
conBookings.Open()
Dim cmdSelectBookings As New OleDbCommand(stSQL, conBookings)
Dim dsBookings As New DataSet
Dim daBookings As New OleDbDataAdapter(cmdSelectBookings)
daBookings.Fill(dsBookings, "Bookings")
conBookings.Close()
MsgBox(dsBookings.Tables("Bookings").Rows.Count)
我想使用代码获取和查看表,这些表可用于在线预订系统脱机使用。使用Visual Studio 2010
谢谢