I'm not able to fill data within the OleDbDataAdapter

I recieve an OleDbException using the following message Syntax error in FROM clause.

only at that line adapter.Fill(dataset, "User")

This is actually the code

Imports System.Data.OleDb

Public Class Form1

Public connection As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\MyDatabase.mdb;Persist Security Info=False")

Private Sub button_display_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button_display.Click
    connection.Close()
    connection.Open()
    Dim adapter As New OleDbDataAdapter
    adapter.SelectCommand = New OleDbCommand
    adapter.SelectCommand.Connection = connection
    adapter.SelectCommand.CommandText = "select * from user;"

    Dim dataset As New DataSet
    adapter.Fill(dataset, "User")
    connection.Close()
    Dim datarow = dataset.Tables("User").Rows(0)
    Dim fname, lname As String
    fname = datarow(0)
    lname = datarow(1)
    txtfirstname.Text = fname
    txtlastname.Text = lname

End Sub
End Class

I've attempted changing

    Dim adapter As New OleDbDataAdapter
    adapter.SelectCommand = New OleDbCommand
    adapter.SelectCommand.Connection = connection
    adapter.SelectCommand.CommandText = "select * from user;"

    Dim dataset As New DataSet
    adapter.Fill(dataset, "User")

with

    Dim adapter As New OleDbDataAdapter("select * from user;", connection)
    Dim dataset As New DataSet
    adapter.Fill(dataset, "User")

as well as I've attempted

    Dim adapter As New OleDbDataAdapter
    adapter.SelectCommand = New OleDbCommand("select * from user;", connection)
    Dim dataset As New DataSet
    adapter.Fill(dataset)

However I obtain the same exception Syntax error in FROM clause

User is really a reserved word. It ought to be written like so:

"select * from [user];"

Note the square brackets. It might be easier to avoid reserved words altogether by renaming the table.

I am not sure adapter.SelectCommand = New OleDbCommand is correct (I do not do much VB and so i might be wrong) The point is the reason for closing the bond after which opening it after which not closing it? Move your near to the finish.

Try something similar to this:

Dim conn As New OleDbConnection(connection)
Dim adapter As New OleDbDataAdapter()
conn.Open()
adapter.SelectCommand = new OleDbCommand("Select * From User", conn)
DataSet dataset As New DataSet
adapter.Fill(dataset)
conn.Close()

'Rest of the code