[英]Does Sql Server Compact Edition 3.5 query timeout?
我刚刚意识到SqlCeConnection
和SqlCeCommand
对象超时属性是readonly,默认值设置为0.这是否意味着对SqlCe数据库的查询永远不会超时?
No they do timeout , you can define the timeout in connection string like this 不会超时 ,您可以像这样定义连接字符串中的超时
SqlCeConnection conn = new SqlCeConnection();
conn.ConnectionString = "Persist Security Info=False; Data Source = Northwind.sdf;" +
"Password = <password>; server=mySQLServer;Connect Timeout=30";
This is whay MSDN has to say. 这是MSDN不得不说的。 ConnectionTimeout Property is the time (in seconds) to wait for a connection to open.
ConnectionTimeout属性是等待连接打开的时间(以秒为单位)。 The value is always 0 in SQL Server Compact as it is readonly.
SQL Server Compact中的值始终为0,因为它是只读的。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.