Does Sql Server Compact Edition 3.5 query timeout?

1.1k views Asked by At

I just realized that SqlCeConnection and SqlCeCommand objects timeout properties are readonly with default value set to 0. Does this mean queries to SqlCe database never timeout?

1

There are 1 answers

2
Ehsan On BEST ANSWER

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. ConnectionTimeout Property is the time (in seconds) to wait for a connection to open. The value is always 0 in SQL Server Compact as it is readonly.