The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine in 64 Bit Machine

后端 未结 1 1307
你的背包
你的背包 2020-12-06 08:05

I am working in Windows Application. I am reading a value from Excel and updating into the database. My code is

 string Con_Str = \"Provider=Microsoft.ACE.OL         


        
1条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-06 08:54

    You are using Microsoft.ACE.OLEDB.12.0; (ADE for short). This means that you need to install the appropriate bits on your target machine. This is complicated by the Architecture choosen when you build your application.

    You build for AnyCPU:

    Install ADE 32bit on 32bit target machine
    Install ADE 64bit on 64bit target machine
    

    You build for x86

    Install ADE 32bit on 32bit or 64bit target machine.
    

    As you can see, the easiest way to get out is to compile your application for x86 architecture.

    0 讨论(0)
提交回复
热议问题