Quantcast
Channel: VBForums - Database Development
Viewing all articles
Browse latest Browse all 2918

[RESOLVED] access database Issues

$
0
0
My vb.net Project is not finding my database or query, any ideas what I am doing wrong? when I run this project I get this exception "The Microsoft Office Access database engine cannot find the input table or query 'CheckEmployeeStatus'. Make sure it exists and that its name is spelled correctly." I designed the database and ran Test Connection, it came back as good connetion so I know it exists.
My goal with this project is to able to search the table for certain last name, if it exists , I want to be able to upload EmpID, LastName, FirstName, DateEmployed, Empleyeestatus to a datagridview [U]DataGridViewCheckEmployee[/B]
Thanks for your help
Quote:

Dim conn As OleDbConnection = New OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=|DataDirectory|\Humanresouces.accdb")
Dim cmd As New OleDbCommand
cmd.CommandType = CommandType.StoredProcedure
cmd.CommandText = "CheckEmployeeStatus"
cmd.Parameters.Add("@Parameter1", OleDbType.VarChar).Value = "value1" ' Add Parameter
cmd.Connection = conn
conn.Open()
Dim da As OleDbDataAdapter = New OleDbDataAdapter(cmd)
Dim ds As DataSet = New DataSet()
da.Fill(ds, "EmployeeTbl") The code gets highlighted with the with following exception With the following exception The Microsoft Office Access database engine cannot find the input table or query 'CheckEmployeeStatus'. Make sure it exists and that its name is spelled correctly.
DataGridViewCheckEmployee.DataSource = ds.Tables("EmployeeTbl") ' Binding to DataGridView
conn.Close()

Viewing all articles
Browse latest Browse all 2918

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>