Error removing object from database

Thread is closed for posting
4 posts, 0 answers
  1. jr
    jr avatar
    6 posts
    Member since:
    Sep 2009

    Posted 28 Sep 2009 Link to this post

    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"
  2. Damyan Bogoev
    Admin
    Damyan Bogoev avatar
    581 posts

    Posted 28 Sep 2009 Link to this post

    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.
  3. jr
    jr avatar
    6 posts
    Member since:
    Sep 2009

    Posted 28 Sep 2009 Link to this post

    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;
  4. Damyan Bogoev
    Admin
    Damyan Bogoev avatar
    581 posts

    Posted 29 Sep 2009 Link to this post

    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.
Back to Top