Increase default lock timeout in SqlCeConnection.ConnectionString

I'm trying to increase the default lock timeout in my connection string like this:

strConnectionString = "Data Source=....;SSCE:Default Lock Timeout=50000;"


I also tried it like this

strConnectionString = "Data Source=....;default lock timeout=50000;"


But I keep getting the error, that my parameter is invalid for my connection string.
Does anybody know how this have to be implemented properly?

The connection string works fine if I remove it.

January 30th, 2014 3:58am

Hello,

See http://www.connectionstrings.com/all-sql-server-connection-string-keywords/ for all existing properies; something like "Default Lock Timeout" is not available.

See also MSDN Lock Time-out, you can change the value with a SQL statement:

SET LOCK_TIMEOUT 2000; 

Free Windows Admin Tool Kit Click here and download it now
January 30th, 2014 4:05am

Thanks, I will try that out.

If this is not available, why is it listed on the MSDN-site I linked in my opening post?

January 30th, 2014 4:10am

why is it listed on the MSDN-site I linked in my opening post?


Have you notice the NET version of the article? By your other post you are using an older version, so you better refer to http://msdn.microsoft.com/en-us/library/system.data.sqlserverce.sqlceconnection.connectionstring(v=vs.71).aspx
Free Windows Admin Tool Kit Click here and download it now
January 30th, 2014 5:37am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics