Results 1 to 4 of 4

Thread: [RESOLVED] Program Loading Databases Windows 7

  1. #1

    Thread Starter
    Fanatic Member BenJones's Avatar
    Join Date
    Mar 2010
    Location
    Wales UK
    Posts
    814

    Resolved [RESOLVED] Program Loading Databases Windows 7

    Hello,
    I got a new cmputer the other day and it came with Windows 7 64bit,but I noticed some of my db projects are not working, and keep comming up with this error

    The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine.

    I use this code to open the database.

    Code:
                ConnectStr = "PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE=" + _dbfile;
    
                //Create new connection
                cnn = new OleDbConnection(ConnectStr);
                try
                {
                    cnn.Open();
                }
                //Error flag
                catch(Exception err)
                {
                    MessageBox.Show(err.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    this.Close();
                    return;
                }
    I also downloaded the database access components, but for some reason the installer just does not work. eveything worked fine in Windows Vista. anyway hope someone can help thanks.

  2. #2
    A SQL Server fool GaryMazzone's Avatar
    Join Date
    Aug 2005
    Location
    Dover,NH
    Posts
    7,493

    Re: Program Loading Databases Windows 7

    The problem is the Jet 4 driver. You need to comple the code for 32 bit CPU and not Any CPU. There is no 64 bit driver for Jet
    Sometimes the Programmer
    Sometimes the DBA

    Mazz1

  3. #3
    Frenzied Member avrail's Avatar
    Join Date
    Mar 2006
    Location
    Egypt, Cairo
    Posts
    1,221

    Re: Program Loading Databases Windows 7

    Quote Originally Posted by GaryMazzone View Post
    The problem is the Jet 4 driver. You need to comple the code for 32 bit CPU and not Any CPU. There is no 64 bit driver for Jet
    hay,
    did you mean he can not add Jet 4 to his project because his CPU is 64 bit ???
    You Don't Have to Rate Me.
    I'm Not a Civilized Man I'm the Civilization it self
    White or Black, Living or Dieing and 0 or 1 that's MY life
    iam an Object in Object Oriented Life
    my blog : http://refateid.blogspot.com/
    twitter :@avrail
    010011000111010101110110001000000100110101111001001000000101000001100011

  4. #4
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: Program Loading Databases Windows 7

    The Jet driver/provider will not work in a 64 bit program.

    You either need to force the program to be 32 bit (as GaryMazzone explained), or get rid of Jet and use ACE instead - the latest version is 64 bit compatible.

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