Sql Server Compact(CE)问题 - “找不到PInvoke DLL的'sqlceme35.dll'" [英] Sql Server Compact (CE) issue - "Can't find PInvoke DLL 'sqlceme35.dll'"

查看:56
本文介绍了Sql Server Compact(CE)问题 - “找不到PInvoke DLL的'sqlceme35.dll'"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我安装了Sql Server 2008 r2,后来为windows mobile安装了sql server compact sp2。它的工作正常。现在我正在尝试通过VS 2008(新项目 - 智能设备 - 智能设备项目)连接Sql Server CE。

它给出了一个错误 -

找不到PInvoke DLL''sqlceme35.dll''



我只是不知道该做什么以及如何继续。

我没有任何智能设备,仅使用美国Windows Mobile 5.0 Pocket PC R2仿真器。



其中一些(在互联网上搜索)是说要在我的智能设备上安装一些CAB文件,显然我没有。



这是我的代码:



Hi,

I installed Sql Server 2008 r2 and later installed sql server compact sp2 for windows mobile. Its working fine. Now I''m trying to connect Sql Server CE through VS 2008 (New-project-Smart Device-Smart Device Project).
It is giving an error-
"Can''t find PInvoke DLL ''sqlceme35.dll''"

I just don''t know what to do and how to proceed.
I''m not having any smart device, just using USA Windows Mobile 5.0 Pocket PC R2 Emulator.

Some of them (searched on internet) are saying to install some CAB files on my smart device, which obviously i don''t have one.

This is my code:

private void menuItem1_Click(object sender, EventArgs e)
{
    SqlCeConnection con;
    try
    {
        con = new SqlCeConnection("Data Source=C:\\Data_Base.sdf");
        con.Open();
        MessageBox.Show(con.State.ToString());
        textBox1.Text = "Hi dude...!";
    }
    catch (Exception ex)
    {
        textBox1.Text = ex.Message;
    }
    finally
    {
        con.Close();
        MessageBox.Show(con.State.ToString());
    }
}



请建议我如何摆脱这个问题..



此外,我无法使用智能设备应用程序直接连接到SQL Server 2008 ...


Please suggest me how to get rid of this issue..

Also I''m unable to connect to SQL Server 2008 directly using Smart Device Applications...

推荐答案

您是否已安装SQL Server CE?



从来没有使用过移动SDK,所以我在黑暗中捅了一下,但是这个博客列出了你会得到这个错误的主要原因,以及解决方案:找不到P / Invoke DLL sqlcemeNN.dll



Google似乎表明很多人的问题都与cab文件或没有安装服务器CE。
Have you installed the SQL Server CE to it?

Never used the Mobile SDK, so I''m taking a stab in the dark here, but this blog lists the primary reasons you would get that error, and the solution for them: Can’t find P/Invoke DLL sqlcemeNN.dll

Google seems to indicate that a lot of people''s problems were with the cab files or not having installed server CE.


这篇关于Sql Server Compact(CE)问题 - “找不到PInvoke DLL的'sqlceme35.dll'"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆