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

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篇文章给了解决的方法,十分感谢。
不得不说老外的啰嗦程度 ……
只看这几步好了 ..

  1. Within Solution Explorer, select your project and choose Add Existing Item
  2. Navigate to C:\Program Files\Microsoft Visual Studio 8\Common7\IDE
  3. Change the files of type to all files
  4. Click in the file list window and type sqlce to get to the files that start with these letters
  5. 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.

  1. Select all 7 files in solution explorer and select the property grid.
  2. 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.
  3. 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,问题解决了。
posted @ 2012-08-02 09:09  起哄者  阅读(658)  评论(0)    收藏  举报