Search code examples
vb.netoledbfoxprodbase

problem to open connection to dbase database only in specific project


I'm trying to connect to a dBase (.dbf) database by VB.Net, I installed vfpoledb provider and use connection string like bellow :

  Dim cn As New OleDb.OleDbConnection With {.ConnectionString = "Provider=vfpoledb.1;Data Source=[MyAddress]"}

I got an error like this only in specific project :

The 'vfpoledb.1' provider is not registered on the local machine

my project is compile on x86 platform and when I create a new project and use same code, everything is OK. only my main project got this error.

both of my projects have same compiling options


Solution

  • Finally I found the problem, my main application must run as administrator but other projects run as current user, so I removed "Provider" and reinstalled it. I found that the default option on setup is "Just me"; I changed it to "Everyone" and the problem fixed.

    Select every one option