Dear NG, i have problem to delete some Data from the Database. I'am using the following code :
private void deleteMD_ExtendedElementInformation(ArrayList
pimaryKeyListB2112)
{
LOGGER.debug("ENTERING deleteMD_ExtendedElementInformation()
...");
String sqlStatement = null;
ArrayList foreignKeyListRespParty = null;
ExteleinfoB2112 exteleinfoB2112 = null;
if(pimaryKeyListB2112 != null)
{
int countPrimaryKeys = pimaryKeyListB2112.size();
if(countPrimaryKeys != 0)
{
for(int i=0;i<countPrimaryKeys;i++)
{
try
{
Integer idExtTeleInfo =
(Integer)pimaryKeyListB2112.get(i);
exteleinfoB2112 =
ExteleinfoB2112Peer.retrieveByPK(idExtTeleInfo);
System.out.println("idExtTeleInfo: " + idExtTeleInfo);
//l�scht Refernez in
EXTELEINFO_EXTELEPARENT.
sqlStatement = "DELETE FROM
EXTELEINFO_EXTELEPARENT WHERE
IDEXTELEINFO="+idExtTeleInfo;
ExteleinfoExteleparentPeer.executeStatement(sqlStatement);
//l�scht Referenz in
EXTELEINFO_EXTELERAT.
sqlStatement = "DELETE FROM
EXTELEINFO_EXTELERAT WHERE
IDEXTELEINFO="+idExtTeleInfo;
ExteleinfoExteleratPeer.executeStatement(sqlStatement);
Criteria criteria = new
Criteria();
criteria.add(ExteleinfoExtelesrcPeer.IDEXTELEINFO, idExtTeleInfo);
List extelSrcList =
ExteleinfoExtelesrcPeer.doSelect(criteria);
if(extelSrcList != null)
{
int countExtelSrc =
extelSrcList.size();
if(countExtelSrc != 0)
{
ExteleinfoExtelesrcPeer.doDelete(criteria);
foreignKeyListRespParty = new ArrayList();
Iterator
iterator = extelSrcList.iterator();
while(iterator.hasNext())
{
ExteleinfoExtelesrc exteleinfoExtelesrc =
(ExteleinfoExtelesrc)iterator.next();
Integer
idResParty = exteleinfoExtelesrc.getIdrespparty();
foreignKeyListRespParty.add(idResParty);
}
deleteCI_ResponsibleParty(foreignKeyListRespParty);
}
}
//ExteleinfoB2112Peer.doDelete(exteleinfoB2112);
}
catch(TorqueException te)
{
LOGGER.error("Error in
deleteMD_ExtendedElementInformation()", te);
}
finally
{
try
{
//The Problem occurs
here when I want to delete this dataset in the
DB
//The following Error
is thrown java.sql.SQLException: ORA-01453: SET
TRANSACTION muss erste Anweisung der Transaktion sein
ExteleinfoB2112Peer.doDelete(exteleinfoB2112);
}
catch(TorqueException te)
{
LOGGER.error("Error in
deleteMD_ExtendedElementInformation()", te);
}
}
}
}
}
LOGGER.debug("EXIT deleteMD_ExtendedElementInformation() ...");
}
Does anybody have the problems or knows some solution for this problem?
Any help is appreciated. Thanks in advance.
Ferruh
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
