Quote:
How should I solve "system.data.oledb.oledbexception: 'no value given for one or more required parameters.'?
Error looks explanatory here: Your query used is not as expected and needs to be setup correctly.
Quote:
stSQL = "SELECT BookingID, Customer, Set FROM tblBOokings"
Looking at it, it's a hardcoded query that you are using. First thought was something is missing in query while passing but seems you have plain vanilla SELECT. But then it seems the problem could be becasue of
KEYWORD SET[
^] there. You might have defined a column named 'Set' but once you put that here in query as done, it turns to different meaning and could raise error.
Change the column name and try. Or a quick validation by selecting all.
stSQL = "SELECT * FROM tblBOokings"
If the error goes away, then you can correct column name and then move on.
UPDATE:
Whatever I shared above, that should trow differet error though. The verbage of it. So in case above does not solve, you should still make the change.
Possibly, it's because of you trying to fill the dataset directly with adapter. You need to fill into a DataTable instead.
Try:
Dim custTable As DataTable = New DataTable("Books")
Dim dsBookings As New DataSet
dsBookings.Tables.Add(custTable)
Dim daBookings As New OleDbDataAdapter(cmdSelectBookings)
daBookings.Fill(custTable, "Bookings")
conBookings.Close()
Refer:
OleDbDataAdapter.Fill Method (System.Data.OleDb) | Microsoft Docs[
^]