Search code examples
c#ms-access-2007

Expecting non-empty string for 'providerInvariantName' parameter error in c# application having access database


I have a C# application having Access .accdb as a Database. Connection String are Managed by App.Config. I had developed project in 64 bit machine and when I installed application 32 bit machine at the time of Database connection error pops up that "Expecting non-empty string for 'providerInvariantName' parameter". Please help me. Thanks in advance.


Solution

  • I have added following code in App.config file in :

    <startup>
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
    </startup>
    

    And after that error disappears.