zoukankan      html  css  js  c++  java
  • “Unable to load DLL” problem with SQL Server CE

    I got an error when using SQL Server Compact 3.5 (SqlCe) with asp.net MVC3 web application.

    The error is like: “Unable to load DLL ‘sqlcese35.dll’: The specified module could not be found. (Exception from HRESULT: …

    When looking this issue, I found that SQL CE is not installed in GAC so the reference is added from its installation folder. e.g. C:\Program Files\Microsoft SQL Server Compact Edition\v3.5\Private. And the file name is “System.Data.SqlServerCe.dll".

    This assembly requires several native DLLs to work. They are (possibly):

    sqlcea35.dll

    sqlcecompact35.dll

    sqlceer35en.dll

    sqlceme35.dll

    sqlceoledb35.dll

    sqlceqp35.dll

    sqlcese35.dll

    I’m not sure which of these are really needed. To avoid further problems, I copied all of them into my project’s “bin” folder. bingo, now it works!

    This problem brings an additional deployment step for my web application. I know “xcopy” is easy to deal with. But in the future I would like to take a look for other alternatives against SQL Server CE, e.g. sqlite. Although I’m not sure if it’s a one-file solution.

  • 相关阅读:
    C语言调用VIX_API开关虚拟机
    (转)Vix_API 操作 VMware
    C# U盘扫描
    设置字符集
    LIS系统通讯程序原理与实现
    Linux命令的简写和全称
    远程桌面如何退出全屏或全屏切换
    C#编程总结(七)数据加密
    c# 小叙 Encoding(三)
    c# 小叙 Encoding(二)
  • 原文地址:https://www.cnblogs.com/brucejia/p/2361168.html
Copyright © 2011-2022 走看看