Rainer
7th July 2003, 10:23
: Hello
: I have the following code in a batch-job:
: db.retry.point()
:
: select tiitm001.* from tiitm001 for update
: where tiitm001._index1 = {:tiedm010.eitm}
: selectdo
: db.eq(ttiitm001,db.lock)
: lang = ""
: i = text.delete("tiitm001.txta",lang)
: db.update(ttiitm001,db.retry)
: endselect
: commit.transaction()
:
: After executing this code the text will not be deleted. Returncode is -1. Do you have any idea why text is not deleted
: Thanks a lot in advance.
: Kind regards
: Rainer
Djie-En
7th July 2003, 13:20
Hi,
Probably of still existing references?
Or Logical table linking?
GN
NPRao
7th July 2003, 20:21
Rainer,
Please complete your user profile with regards to the Baan software version, Database software and OS version. This will help other members when diagnosing your problem.
There can be few reasons -
1. If the jobuser login is a BaaN super or normal user.
2. if the default text group set in the user data - ttaad2500m000.
3. if its a normal user login then check the text group authorization template, and its authorizations - ttams1122m000.
Rainer
8th July 2003, 10:17
Thanks for your answer. I have completed the user profile.
1. The jobuser login is me - super user
2. The default text group is set
3. - see above
Normally this programm is activated by job management. When I test the programm with my user and in debug mode the text will not be deleted anyway.
By the way we have SP7 - so we do not have acutally all SP's installed. We also have a lot of unused text, listed by the programm tttxt1210m000. Is it possible - as Djie-En says - that there are a lot of existing references?
Note: This programm is importing items and texts from an external system (cadim - engineering data). The existing text in Baan shall be overwritten - say first has to delete and then new text to insert. This programm causes a lot of unused text.
Regards
Rainer
baan_fun
23rd July 2003, 19:05
Hi Rainer,
Check also the default text groups per text field. Check for tiitm001.txta to see the defaults. This can overwrite the default per user.
Regards.
gfasbender
23rd July 2003, 19:46
Set the tiitm001.txta field to 0, to unlink the text from the item. Then use the utilities in Text Management to delete unused text.
db.retry.point()
select tiitm001.txta
from tiitm001 for update
where tiitm001._index1 = {:tiedm010.eitm}
selectdo
tiitm001.txta = 0
db.update(ttiitm001,db.retry)
endselect
commit.transaction()