on ‎2011 Aug 08 11:36 AM
Has anyone been able to create a silverlight application with SQL Anywhere? I can create an application only on the same machine running the database. In addition I cannot update... the error is:
Cannot begin a transaction because the connection is already enlisted in a transaction
Request clarification before answering.
Doing a quick web search it seems that your problem is affecting multiple database products not only SQL Anywhere.
A solution I have found but have not tested is:
You must define a transaction handling for your Data Source.
public partial class YOURDATASOURCE { private TransactionScope _tscope;
partial void SaveChanges_Executing() { _tscope = new TransactionScope(TransactionScopeOption.Required, new TransactionOptions { IsolationLevel = System.Transactions.IsolationLevel.ReadCommitted }); }
partial void SaveChanges_Executed() { _tscope.Complete(); _tscope.Dispose(); } }
In general if this doesn't work directly it seems to be a good idea to dig into the possibilities you have with using the TransactionScope class from .net to influence the enlistment of DataSources.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 13 | |
| 8 | |
| 6 | |
| 5 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.