I am trying to delete some old dataelements. Previously I have deleted, using SQL delete sentences, all datavalues associated to them. Everything goes well, but still some data elements don’t want to disappear. I mean, when I click on the Remove button (web interface):
Some times appear the message “Deleting …”, but nothing really happens.
or
Other times appear the following message: “Object not deleted because it is associated by object of type”
Any ideas about 1) or 2)? I am using DHIS 2.12 and postgresql
If you try deleting those elements from PGAdmin, the error message will include the object/table to which the data element is associated. You should then delete that association and try deleting the data element again. You could also follow what is happening in your tomcat window when you press delete. This will also let you know the data element cannot be deleted because it is referenced in another table like an org unit group.
Hope this helps.
Regards
Busoye
···
On 28 Aug 2013, at 00:41, Jose Garcia Muñoz <josemp10@gmail.com> wrote:
Dear all,
I am trying to delete some old dataelements. Previously I have deleted, using SQL delete sentences, all datavalues associated to them. Everything goes well, but still some data elements don't want to disappear. I mean, when I click on the Remove button (web interface):
1) Some times appear the message "Deleting ....", but nothing really happens.
or
2) Other times appear the following message: "Object not deleted because it is associated by object of type"
Any ideas about 1) or 2)? I am using DHIS 2.12 and postgresql
** if you did translations of your data elements
translation
You might want to create a script that deletes the specific dataelementids in each table before deleting from the dataelement table.
Randy
···
-----Original Message-----
From: Dhis2-users [mailto:dhis2-users-bounces+rwilson=msh.org@lists.launchpad.net] On Behalf Of Adebusoye Anifalaje
Sent: Wednesday, August 28, 2013 9:10 AM
To: Jose Garcia Muñoz
Cc: dhis2-users@lists.launchpad.net
Subject: Re: [Dhis2-users] Deleting old data elements
Hi Jose,
If you try deleting those elements from PGAdmin, the error message will include the object/table to which the data element is associated. You should then delete that association and try deleting the data element again. You could also follow what is happening in your tomcat window when you press delete. This will also let you know the data element cannot be deleted because it is referenced in another table like an org unit group.
Hope this helps.
Regards
Busoye
On 28 Aug 2013, at 00:41, Jose Garcia Muñoz <josemp10@gmail.com> wrote:
Dear all,
I am trying to delete some old dataelements. Previously I have deleted, using SQL delete sentences, all datavalues associated to them. Everything goes well, but still some data elements don't want to disappear. I mean, when I click on the Remove button (web interface):
1) Some times appear the message "Deleting ....", but nothing really happens.
or
2) Other times appear the following message: "Object not deleted because it is associated by object of type"
Any ideas about 1) or 2)? I am using DHIS 2.12 and postgresql
Subject: Re: [Dhis2-users] Deleting old data elements
Hi Jose,
If you try deleting those elements from PGAdmin, the error message will include the object/table to which the data element is associated. You should then delete that association and try deleting the data element again. You could also follow what is happening in your tomcat window when you press delete. This will also let you know the data element cannot be deleted because it is referenced in another table like an org unit group.
I am trying to delete some old dataelements. Previously I have deleted, using SQL delete sentences, all datavalues associated to them. Everything goes well, but still some data elements don’t want to disappear. I mean, when I click on the Remove button (web interface):
Some times appear the message “Deleting …”, but nothing really happens.
or
Other times appear the following message: “Object not deleted because it is associated by object of type”
Any ideas about 1) or 2)? I am using DHIS 2.12 and postgresql
the recommendations given about SQL statements are correct, however this is probably a bug with deletion in DHIS which should be fixed. Could you please share the output in your Tomcat / server container log appearing after you delete those data elements?
regards,
Lars
···
On Wed, Aug 28, 2013 at 12:41 AM, Jose Garcia Muñoz josemp10@gmail.com wrote:
Dear all,
I am trying to delete some old dataelements. Previously I have deleted, using SQL delete sentences, all datavalues associated to them. Everything goes well, but still some data elements don’t want to disappear. I mean, when I click on the Remove button (web interface):
Some times appear the message “Deleting …”, but nothing really happens.
or
Other times appear the following message: “Object not deleted because it is associated by object of type”
Any ideas about 1) or 2)? I am using DHIS 2.12 and postgresql