HOME > .NET Framework > Forum > ข่วยทีครับ เกิด error ตรงส่วนของ adapter.Fill...he Microsoft Jet database engine cannot find the input table or query 'Employee'. Make sure it exists and t.
ข่วยทีครับ เกิด error ตรงส่วนของ adapter.Fill...he Microsoft Jet database engine cannot find the input table or query 'Employee'. Make sure it exists and t.
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim conStr As String = "Provider=Microsoft.Jet.Oledb.4.0;" & "Data Source=C:\Users\Admin\Desktop\Project\Bakery.mdb"
Dim conn As New OleDbConnection(conStr)
conn.Open()
Dim sql As String = "SELECT*FROM Employee"
Dim cmd As New OleDbCommand(sql, conn)
Dim adapter As New OleDbDataAdapter(cmd)
Dim data As New DataSet() adapter.Fill(data, "emp") <<<<<<<<< มันขึ้นว่าThe Microsoft Jet database engine cannot find the input table or query 'Employee'. Make sure it exists and that its name is spelled correctly
For i = 0 To data.Tables("emp").Rows.Count - 1
name = data.Tables("emp").Rows(i)("Name")
name &= " " & data.Tables("emp").Rows(i)("Last name")
ListBox1.Items.Add(name)