Sunday, February 19, 2012

In trouble with Async Replication..

Hello Everybody,

In the past few days I try to work with SQL Mobil and Replication.

And now I have a big problem.

When the replication ist running in my little application the pda-user wants not stop there working. So I try to implement some routines of code that I find in this onlinearticle: http://msdn2.microsoft.com/en-us/library/2ysxae29.aspx

The codes workes fine as long I don't start another SQL Task. When I start either (Select, Insert, Update or Delete) Statement the Database crash with errormessage: "The database file may be corrupted. Run the repair utility...

Can anyone give me a tip what I must do to fix this problem.

Many Thanks

Markus

I'm not sure, but i think that replication must run alone. You can't work with the data from the replication tables while you're replicating.

If you look the SqlCeReplication.Synchronize() documentation, you'll read this remark: "All other connections to the database must be closed prior to calling this method."

http://msdn2.microsoft.com/en-us/library/system.data.sqlserverce.sqlcereplication.synchronize.aspx

No comments:

Post a Comment