小弟用的是VS2010开发工具,我一个WinForm程序用的是Access数据库,在我自己的开发电脑上可以正常运行,到了某些客户机器上运行但连不了数据库。本地开发时使用的是Office2003,我在新做的虚拟机里测试,能正常安装运行,好像到了非Office2003版本的机器上连不上数据库了,这是为什么?希望之前遇到这方面问题的人,帮帮忙,谢谢!OfficeWinForm数据库

解决方案 »

  1.   

    office.dll
    Microsoft.Office.Interop.Excel.dll
      

  2.   

    你是说要引用这2个dll文件?什么版本的?
    我本地引用了Microsoft.Office.Interop.Excel.dll,有没有让所有电脑都可以正常运行,不限制客户的机器装的是Office2003还是2007版本?
      

  3.   

    貌似在没有装access的机器上,缺少访问需要的类库,程序是要打包成安装文件的,以便带上所需的库
      

  4.   

    应该是客户机器上引用的dll文件版本不对的问题吧,打包成安装文件就没问题了
      

  5.   

    你是说要引用这2个dll文件?什么版本的?
    我本地引用了Microsoft.Office.Interop.Excel.dll,有没有让所有电脑都可以正常运行,不限制客户的机器装的是Office2003还是2007版本?
    好像是我没说清楚,下载一个oxppia包里面不但包含有说过的DLL好像也有ACCESS的DLL注册就可以了
    Microsoft.Office.Interop.Access.dll
    Microsoft.Office.Interop.Access.dll.reg
      

  6.   

    Redistributable Files:adodb.dll
    adodb.dll.reg
    dao.dll
    dao.dll.reg
    Microsoft.Office.Interop.Access.dll
    Microsoft.Office.Interop.Access.dll.reg
    Microsoft.Office.Interop.Excel.dll
    Microsoft.Office.Interop.Excel.dll.reg
    Microsoft.Office.Interop.FrontPage.dll
    Microsoft.Office.Interop.FrontPage.dll.reg
    Microsoft.Office.Interop.FrontPageEditor.dll
    Microsoft.Office.Interop.FrontPageEditor.dll.reg
    Microsoft.Office.Interop.Graph.dll
    Microsoft.Office.Interop.Graph.dll.reg
    Microsoft.Office.Interop.Outlook.dll
    Microsoft.Office.Interop.Outlook.dll.reg
    Microsoft.Office.Interop.OutlookViewCtl.dll
    Microsoft.Office.Interop.OutlookViewCtl.dll.reg
    Microsoft.Office.Interop.Owc.dll
    Microsoft.Office.Interop.Owc.dll.reg
    Microsoft.Office.Interop.PowerPoint.dll
    Microsoft.Office.Interop.PowerPoint.dll.reg
    Microsoft.Office.Interop.Publisher.dll
    Microsoft.Office.Interop.Publisher.dll.reg
    Microsoft.Office.Interop.Visio.dll
    Microsoft.Office.Interop.Visio.dll.reg
    Microsoft.Office.Interop.Word.dll
    Microsoft.Office.Interop.Word.dll.reg
    Microsoft.Vbe.Interop.dll
    Microsoft.Vbe.Interop.dll.reg
    mscomctl.dll
    mscomctl.dll.reg
    msdatasrc.dll
    msdatasrc.dll.reg
    mstag.dll
    mstag.dll.reg
    office.dll
    office.dll.reg
    stdole.dll
    stdole.dll.reg
    可能还需要引用如ADO等相关的才可以,不过没试过,只用过上面说过的,不过可以推论出来,不妨一试.