SqlConnection does not support parallel transactions.
-
20 พฤศจิกายน 2552 10:15at dbserversyncprovider I could able to enumerate the changes and when at applying changes at clientsyncprovider I get the error"SqlConnection does not support parallel transactions.".
for reference:
public class SQLExpressClientSyncProvider:ClientSyncProvider
{
private DbServerSyncProvider _dbSyncProvider;
private Guid _clientId;
public
override SyncContext ApplyChanges(SyncGroupMetadata groupMetadata, System.Data.DataSet dataSet, SyncSession syncSession)
{
SyncContext syncContext = _dbSyncProvider.ApplyChanges(groupMetadata, dataSet, syncSession);
foreach (SyncTableMetadata table in groupMetadata.TablesMetadata)
{
SetTableReceivedAnchor(table.TableName, groupMetadata.NewAnchor);
}
return syncContext;
}
Thanks, Bharathi- ย้ายโดย Max Wang_Chinasoft 21 เมษายน 2554 22:29 forum consolidation (From:SyncFx - Microsoft Sync Framework Database Providers [ReadOnly])
ตอบทั้งหมด
-
21 พฤศจิกายน 2552 0:20
The exception means the is trying 2 or more simultaneous transactions on single SqlConnection. There can be lots of possiblities for this. Make sure your code is thread safe and you are not reusing transactions.
I would recommend you to move to SqlSyncProvider for your scenario
thanks
Jandeep
jandeepc- เสนอเป็นคำตอบโดย Jandeep 21 พฤศจิกายน 2552 0:33
- ทำเครื่องหมายเป็นคำตอบโดย Dong CaoMicrosoft, Moderator 22 พฤศจิกายน 2552 5:18
- ยกเลิกการทำเครื่องหมายเป็นคำตอบโดย bharathi_m 25 พฤศจิกายน 2552 6:54
-
25 พฤศจิกายน 2552 7:00
The exception means the is trying 2 or more simultaneous transactions on single SqlConnection. There can be lots of possiblities for this. Make sure your code is thread safe and you are not reusing transactions.
I would recommend you to move to SqlSyncProvider for your scenario
thanks
Jandeep
jandeepcjandeep,what are the other important possibilities?i am using the sqlexpresscliensyncprovider class provided by microsoft.It is working fine for uploadonly sync.for downloadonly sync I am getting the exception.also the same code was working fine in past. after adding some few tables I am getting the exception.please let me know if you want more details.
Thanks, Bharathi -
28 พฤศจิกายน 2552 5:38เจ้าของBharathi,
As posted in the other thread, I highly encourage you to please use the SqlSyncProvider that ship as part of Microsoft Sync Framework 2.0 Database providers (SDK and redists) as the Server and client providers. The previously posted express client was just a sample that was not complete in its feature set, was posted as a stop gap solution. The recently shipped provider that I mention above has been tested to run fine against the express clients and supports conflicts and is a supported version of the provider.
Mahesh
This posting is provided AS IS with no warranties, and confers no rights -
30 พฤศจิกายน 2552 9:36
Bharathi,
As posted in the other thread, I highly encourage you to please use the SqlSyncProvider that ship as part of Microsoft Sync Framework 2.0 Database providers (SDK and redists) as the Server and client providers. The previously posted express client was just a sample that was not complete in its feature set, was posted as a stop gap solution. The recently shipped provider that I mention above has been tested to run fine against the express clients and supports conflicts and is a supported version of the provider.
Mahesh
This posting is provided AS IS with no warranties, and confers no rights
I am in half way of coding.should I change my existing classes(clientsyncprovider and serversyncprovider) to sqlsyncprovider?
is there any example for SqlSyncProvider?
Thanks, Bharathi -
1 ธันวาคม 2552 1:07เจ้าของ
I would recommend you to use the new sqlsyncprovider.
For samples, maybe here is what you can do: (I just posted this in another thread)
Please start with the overview here.
Then use the sample - C:\Program Files (x86)\Microsoft SDKs\Microsoft Sync Framework\2.0\Samples\SharingAppDemo-CEProviderEndToEnd - that comes with the SDK. However the sample syncs between SQL Server to Compact client. However the pattern of usage is not very different.
This posting is provided AS IS with no warranties, and confers no rights- ทำเครื่องหมายเป็นคำตอบโดย Yunwen BaiMicrosoft, Moderator 3 ธันวาคม 2552 9:49