This is a migrated thread and some comments may be shown as answers.
Error removing object from database
3 Answers 19 Views
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
jr
Top achievements
Rank 1
jr asked on 28 Sep 2009, 09:49 AM
I'm getting this error on a scope.commit after a scope.remove.
Anyone knows the problem?
Thanks

"at Telerik.OpenAccess.SPI.Backends.ThrowException(Exception e) at Telerik.OpenAccess.RT.ExceptionWrapper.Throw() at OpenAccessRuntime.DataObjects.OpenAccessPersistenceManagerImp.handleException(Exception x) at OpenAccessRuntime.DataObjects.OpenAccessPersistenceManagerImp.internalCommit(Boolean phase) at OpenAccessRuntime.DataObjects.OpenAccessPersistenceManagerImp.commit() at OpenAccessRuntime.DataObjects.UnsynchronizedPMProxy.commit() at"

3 Answers, 1 is accepted

Sort by
0
Damyan Bogoev
Telerik team
answered on 28 Sep 2009, 03:45 PM
Hi João Martins,

Could you please elaborate a bit more on the problem? We are unable to find out what the problem could be from information that you provided. It should be enough to send us the code that caused the exception along with the definitions of the persistent classes involved.

Kind regards,
Damyan Bogoev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
jr
Top achievements
Rank 1
answered on 28 Sep 2009, 04:01 PM
the method that gives the error is:

 public string removeLo(string idLo)
        {
            if (!scope.Transaction.IsActive)
            {
                scope.Transaction.Begin();
            }

            Lo l = devolveLo(idLo);

            l.RemoveTodosFicheiros();

            removeRegistosDeLo(idLo);

            scope.Remove(l);

            try
            {
                scope.Transaction.Commit();
...


The Lo class has this attributes:

     private int mIdLo;
        private string mTitulo;
        private string mObjectivos;
        private string mSintese;
        private int mCreditos;
        private string mDirectoria;
        private string mEstado;
        private IList<Ficheiro> mFicheiros;
        private IList<Pagina> mPrograma;
        private Utilizador mCriador;
        private IList<Utilizador> mAlunos;
        private IList<Guid> mCompetencias;
0
Damyan Bogoev
Telerik team
answered on 29 Sep 2009, 03:04 PM
Hi João Martins,

We would like to ask you for an additional information regarding what the following methods do:
-    devolveLo;
-    RemoveTodosFicheiros;
-    removeRegistosDeLo;
Can you please provide the full stack trace and the exception message?

Best wishes,
Damyan Bogoev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
General Discussions
Asked by
jr
Top achievements
Rank 1
Answers by
Damyan Bogoev
Telerik team
jr
Top achievements
Rank 1
Share this question
or