SqlCeTransactionInProgressException Class
.NET Framework 3.0
Occurs when an attempt is made to modify a database while another transaction is in progress.
Namespace: System.Data.SqlServerCe
Assembly: System.Data.SqlServerCe (in system.data.sqlserverce.dll)
Assembly: System.Data.SqlServerCe (in system.data.sqlserverce.dll)
'Declaration Public Class SqlCeTransactionInProgressException Inherits SqlCeException 'Usage Dim instance As SqlCeTransactionInProgressException
public class SqlCeTransactionInProgressException extends SqlCeException
public class SqlCeTransactionInProgressException extends SqlCeException
Not applicable.
Dim timeout As New TimeSpan(0, 0, 15) 'hours, minutes, seconds Dim startTime As DateTime = DateTime.Now While DateTime.Now - startTime < timeout Try Dim repl As New SqlCeReplication() repl.InternetUrl = "http://www.adventure-works.com/sqlmobile/sqlcesa30.dll" repl.Publisher = "myPublisher" repl.PublisherDatabase = "AdventureWorks" repl.PublisherSecurityMode = SecurityType.NTAuthentication repl.Publication = "AdventureWorks" repl.Subscriber = "Test" repl.SubscriberConnectionString = "Data Source='MyDatabase.sdf';Password='';" repl.Synchronize() Catch exInProgress As SqlCeTransactionInProgressException Thread.Sleep(3000) GoTo ContinueWhile1 Catch exTimeout As SqlCeLockTimeoutException ' Add your own error-handling logic here GoTo ContinueWhile1 Catch e As SqlCeException MessageBox.Show(e.Message) End Try ContinueWhile1: End While
System.Object
System.Exception
System.SystemException
System.Data.SqlServerCe.SqlCeException
System.Data.SqlServerCe.SqlCeTransactionInProgressException
System.Exception
System.SystemException
System.Data.SqlServerCe.SqlCeException
System.Data.SqlServerCe.SqlCeTransactionInProgressException
Community Additions
ADD
Show: