如何让我的 SQL Server CE 连接打开得更快? [英] How can I make my SQL Server CE connection open faster?

查看:26
本文介绍了如何让我的 SQL Server CE 连接打开得更快?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要一些帮助,我的项目中有一个 SQL Server CE 数据库,我在加载第一个表单时打开连接并保持打开状态,您知道通常情况:

I need some help, I have a SQL Server CE database in my project and I open the connection when loading the first form and keep it open, you know the usual:

if (con.State == ConnectionState.Closed)
{
    con.Open();
}

它工作得很好,但是打开连接的第一时间太长了.

It works perfectly fine, but that first moment when it's opening the connection is toooooo long.

我的问题是,有没有办法让打开过程更快一点,这样我的程序的用户就不会在等待打开时睡着?

My question is, isn't there a way to make that opening process go a little faster so that my program's users won't fall asleep waiting for it to open?

提前致谢...

推荐答案

打开 SQL Compact 连接会特别慢的原因有很多:

There are a number of reasons, why opening a SQL Compact connection can be extra slow:

1:数据库已在其他平台上创建(例如 Windows 7 => Windows XP)

1: The database has been created on another platform (For example Windows 7 => Windows XP)

2:RSA 文件夹上的 ACL(访问控制列表)已损坏

2: The ACL (Access Control List) on the RSA folder is corrupt

3:无效的 Internet 代理配置

3: Invalid Internet Proxy configuration

我的博客文章中有更多详细信息和解决方法建议:http://erikej.blogspot.dk/2013/08/faq-why-is-opening-my-sql-server.html

I have much more details and suggestions for workaround in my blog post here: http://erikej.blogspot.dk/2013/08/faq-why-is-opening-my-sql-server.html

这篇关于如何让我的 SQL Server CE 连接打开得更快?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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