Results 1 to 7 of 7

Thread: Error, cannot find OleDb [* Resolved *]

Threaded View

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Dec 2001
    Posts
    1,331

    Error, cannot find OleDb [* Resolved *]

    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:
    1. cnnTeacher.ConnectionString = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\IBS Library System\LibrarySystem.mdb;Persist Security Info=False";
    2.  
    3.                 OleDbCommand cmdTeacher = cnnTeacher.CreateCommand();
    4.                 cmdTeacher.CommandText = "Select * From Teacher Where TeacherID = txtIDNumber.text";
    5.  
    6.                 cmdTeacher.Parameters.Add("ID", OleDb.VarWChar, 40).Value = txtIDNumber.Text; //OleDb could not be found
    7.                 OleDbDataAdapter daTeacher = new OleDbDataAdapter(cmdTeacher);
    8.                 OleDbCommandBuilder cbTeacher = new OleDbCommandBuilder(daTeacher);
    9.  
    10.                 daTeacher.Fill(dtTeacher);

    Many thanks in advance,

    Steve
    Last edited by steve_rm; Oct 4th, 2004 at 10:26 PM.
    steve

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width