Hello
I have a problem with the following code. It gives an error saying that the OleDb could not be found. I have included using System.OleDb at the top of my form. But still get the error.
VB Code:
cnnTeacher.ConnectionString = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\IBS Library System\LibrarySystem.mdb;Persist Security Info=False"; OleDbCommand cmdTeacher = cnnTeacher.CreateCommand(); cmdTeacher.CommandText = "Select * From Teacher Where TeacherID = txtIDNumber.text"; cmdTeacher.Parameters.Add("ID", OleDb.VarWChar, 40).Value = txtIDNumber.Text; //OleDb could not be found OleDbDataAdapter daTeacher = new OleDbDataAdapter(cmdTeacher); OleDbCommandBuilder cbTeacher = new OleDbCommandBuilder(daTeacher); daTeacher.Fill(dtTeacher);
Many thanks in advance,
Steve




Reply With Quote