New Posts New Posts RSS Feed: Exception: "transaction has aborted"  When Implementing code sample with DevArt dotConnect for postgres
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Exception: "transaction has aborted" When Implementing code sample with DevArt dotConnect for postgres

 Post Reply Post Reply
Author
yasirhantoush View Drop Down
Newbie
Newbie
Avatar

Joined: 28-Feb-2011
Location: UAE
Posts: 3
Post Options Post Options   Quote yasirhantoush Quote  Post ReplyReply Direct Link To This Post Topic: Exception: "transaction has aborted" When Implementing code sample with DevArt dotConnect for postgres
    Posted: 28-Feb-2011 at 2:37am
Hello everyone,

I am trying to use DevArt dotConnect for a postgres database.
I am following the Code Sample:Hello DevForce.
I followed every step using Northinwind db and it was working fine.
Then I did same typical steps only this time using a DevArt dotConnect connection instead,, and it fails with the exception:
    - IdeaBlade.EntityModel.EntityServerException:The transaction has aborted
    - FailureType: IdeaBlade.EntityModel.PersistenceFailure.Other

This is the StackTrace:

   at IdeaBlade.EntityModel.EntityManager.HandleEntityServerException(Exception ex, Boolean tryToHandle, PersistenceOperation operation, Boolean throwOnError)
   at IdeaBlade.EntityModel.EntityManager.HandleEntityServerException(Exception ex, Boolean tryToHandle, PersistenceOperation operation, Boolean throwOnError)
   at IdeaBlade.EntityModel.EntityManager.ExecuteServerQuery(IEntityQuerySurrogate entityQuery)
   at IdeaBlade.EntityModel.EntityManager.ExecuteFetch(IEntityFinder finder)
   at IdeaBlade.EntityModel.EntityQueryFinder.Execute()
   at IdeaBlade.EntityModel.EntityManager.ExecuteQueryCore(IEntityQuery query, Boolean isAsync)
   at IdeaBlade.EntityModel.EntityManager.ExecuteQuery[T](IEntityQuery`1 query)
   at IdeaBlade.EntityModel.EntityQueryExtensions.Execute[T](IEntityQuery`1 query)
   at IdeaBlade.EntityModel.EntityQuery`1.GetEnumerator()
   at WpfApplication1.MainWindowViewModel.FirstSample() in D:\ITProjects\Scrap\WpfApplication1\WpfApplication1\MainWindowViewModel.cs:line 37
   at WpfApplication1.MainWindowViewModel.Start() in D:\ITProjects\Scrap\WpfApplication1\WpfApplication1\MainWindowViewModel.cs:line 22
   at WpfApplication1.MainWindow.Window_Loaded(Object sender, RoutedEventArgs e) in D:\ITProjects\Scrap\WpfApplication1\WpfApplication1\MainWindow.xaml.cs:line 32 ...


Any ideas what is the problem?

Thanks.


Edited by yasirhantoush - 01-Mar-2011 at 12:47am
Back to Top
sbelini View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 13-Aug-2010
Location: Oakland
Posts: 786
Post Options Post Options   Quote sbelini Quote  Post ReplyReply Direct Link To This Post Posted: 04-Mar-2011 at 3:32pm
yasirhantoush,
 
Sorry for the delayed reply,
 
I am in the process of investigating your issue.
 
Silvio.
Back to Top
yasirhantoush View Drop Down
Newbie
Newbie
Avatar

Joined: 28-Feb-2011
Location: UAE
Posts: 3
Post Options Post Options   Quote yasirhantoush Quote  Post ReplyReply Direct Link To This Post Posted: 05-Mar-2011 at 12:19pm
Hello sbelini,

Thanks for the follow up.

I Found out that whenever I set the DevForce Enabled = False in the model properties, it works absolutely fine.
That means when I am using the Entity Framework without DevForce.

Thanks.
Yasir.


Edited by yasirhantoush - 05-Mar-2011 at 12:20pm
Back to Top
sbelini View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 13-Aug-2010
Location: Oakland
Posts: 786
Post Options Post Options   Quote sbelini Quote  Post ReplyReply Direct Link To This Post Posted: 05-Mar-2011 at 1:23pm
Yasirhantoush,
 
Thanks for the update.
 
Can you enable DevForce back and try the following:
 
TransactionSettings.Default = new TransactionSettings (System.Transactions.IsolationLevel.ReadCommitted,
                                                                                     new TimeSpan(0, 1, 0),
                                                                                     false);
 
Let me know if the issue still persists after that.
 
Silvio.
Back to Top
yasirhantoush View Drop Down
Newbie
Newbie
Avatar

Joined: 28-Feb-2011
Location: UAE
Posts: 3
Post Options Post Options   Quote yasirhantoush Quote  Post ReplyReply Direct Link To This Post Posted: 06-Mar-2011 at 3:24am
Hello Silvio,

After adding the .Net reference System.transactions, and adding the provided code, it is working now.

Thanks.
 
Yasir.


Edited by yasirhantoush - 06-Mar-2011 at 3:29am
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down