您的位置:首页 > 数据库

Unable to load DLL 'sqlceme30.dll': 找不到指定的模块。

2012-08-02 09:09 495 查看
http://social.msdn.microsoft.com/Forums/zh-TW/vsdebug/thread/ef1dbc81-8799-464a-9d0d-168a420bd11d
Unable to load DLL 'sqlceme30.dll': 找不到指定的模块。

From this code

[System.Diagnostics.DebuggerNonUserCodeAttribute()]

private System.Data.SqlServerCe.SqlCeDataAdapter Adapter {

get {

if ((this._adapter == null)) {

this.InitAdapter(); Error on this line....

}

return this._adapter;

解决
http://blogs.msdn.com/smartclientdata/archive/2005/07/15/439008.aspx 这2篇文章给了解决的方法,十分感谢。
不得不说老外的啰嗦程度 ……
只看这几步好了 ..

Within Solution Explorer, select your project and choose Add Existing Item

Navigate to C:\Program Files\Microsoft Visual Studio 8\Common7\IDE

Change the files of type to all files

Click in the file list window and type sqlce to get to the files that start with these letters

Shift select all 7 files, sqlcera30.dll, sqlcecompact30.dll, sqlceer30en.dll, sqlceme30.dll, sqlceoledb30.dll, sqlceqp30.dll, sqlcese30.dll and click Add.

You now have the runtime in the project, but it’s not in the execution path.

Select all 7 files in solution explorer and select the property grid.

Change the Copy to Output Directory to Copy if newer
This will make sure these files are copied to the output directory and can be found at runtime.

Hit F5 to test your app.

基本步骤就是
右键点击你的项目,添加-> 现有项->在
%Program Files%\Microsoft Visual Studio 8\Common7\IDE
目录下,选择sqlce开头的7个文件:
sqlceca30.dll,sqlcecompact30.dll,sqlceer30cn.dll,sqlceme30.dll,sqlceoledb30.dll,sqlceqp30.dll,sqlcese30.dll
按“添加”,再在项目中选择这7个文件->属性,“复制到输入目录”,值更改为“如果较新则复制”
按F5,问题解决了。

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐