This question is locked. New answers and comments are not allowed.
Hi there,
I tried to work off some download tasks, that are saved in a database table, that has no relations to other tables.
My code looks like that:
The Download method has no further database transactions or telerik calls.
But the foreach loop always fails in the 50th turn with such message:
A non handled exception of type "Telerik.OpenAccess.Exceptions.UnsupportedException" has occured in Telerik.OpenAccess.dll.
Additional Information: Unsupported Operation: Transaction was terminated before and result set is discarded.
Independend of which data in this table, it is everytime the 50th turn that fails.
I work with SQL server 2008. I know that it is not directly supported yet, but I think this may not be the problem, because I used loops otherwhere too and had no problems. Maybe this is a problem of timeout? Because the this.Download call takes some time.
I tried to work off some download tasks, that are saved in a database table, that has no relations to other tables.
My code looks like that:
using (IObjectScope scope = ObjectScopeProvider.GetNewObjectScope()) |
{ |
IObjectScopeQuery<AssetDownload> assets = from a in scope.Extent<AssetDownload>() |
select a; |
foreach (AssetDownload asset in assets) |
{ |
this.Download(asset.Filepath, asset.Id); |
scope.Transaction.Begin(); |
try |
{ |
scope.Remove(asset); |
scope.Transaction.Commit(); |
} |
catch |
{ |
scope.Transaction.Rollback(); |
throw; |
} |
} |
} |
The Download method has no further database transactions or telerik calls.
But the foreach loop always fails in the 50th turn with such message:
A non handled exception of type "Telerik.OpenAccess.Exceptions.UnsupportedException" has occured in Telerik.OpenAccess.dll.
Additional Information: Unsupported Operation: Transaction was terminated before and result set is discarded.
Independend of which data in this table, it is everytime the 50th turn that fails.
I work with SQL server 2008. I know that it is not directly supported yet, but I think this may not be the problem, because I used loops otherwhere too and had no problems. Maybe this is a problem of timeout? Because the this.Download call takes some time.