spartacus
17th July 2003, 16:30
As far as I know, threre has to be a "commit.transaction()" after a text.write(), in order to finish transactions.

Now, in my case, I tried a "abort.transaction()". After the "text.write()". But regardless to the abort, a new textnumber is created in tttxt001, not in the other texttables.
It looks as if "text.write()" does internaly somehow a "commit.transaction()" for ttxt001, but not for the other tables.


Spartacus

mark_h
17th July 2003, 22:06
I have heard if run tttxt1210m000 wide open it fixes all of your text problems. :) --Please do not try this it was a weak attempt at a joke, since spartacus has posted several text questions recently. Notice the smiley face.

From what I have read about text.write I would not expect a commit.transaction to be needed. I went through and check some of our scripts and I did not see any commit transaction statements. Granted I did not see any that STILL used text.write, but most used text.rewrite. It seems to me we do mass routing and purchase text changes every few months. I would expect that if you did a text.write and decided you did not really want to write the text, then you would need to do a text.delete.

Mark

spartacus
23rd July 2003, 11:39
Hi Mark,

worked the last days with corrupt tables, but also with commit.. or abort.transaction() and the textfunctions.
Seems so that no one agree with me (at least within this thread), but I think you can (even more have) to use commit and abort.

Tried the following: text.write() function in a DLL. After the function call I did a abort.transaction(). Then I opened the text maintenance, I my text was present (strange). Move a little around in the session, closed and opend the session new .... the text is still here ???
But then... if I t open the textwindow, the window is empty !! If I close it .... the text is disapeared.

This is a little strange, but all together seems to show, that a transaction is necessary for the textfunctions.

Perhaps, I you just checked the code, it is not so easy to find the relations between a text.write() and a commit. Maybe you are in a maintain session with main table, then of course you don't need a commit, or the commit is far away on at an other place?

Spartacus

spartacus
23rd July 2003, 11:44
Just found it in baan help "Text fields overview":


Committing transactions

In the case of all text field transactions, you must commit
the transaction yourself.

© 1998 Baan Development B.V. All rights reserved


Spartacus

mark_h
23rd July 2003, 15:48
It makes me wonder now - I went out and looked at some other code we have. One program does the commit and one other does not do a commit. I am still not positive about this, but it appears from your post, that just using the text.write gets some of the data into the tables. It may mean that instead of doing the abort, you might want to commit, then do a text.delete, and maybe another commit.

In checking my knowledge quest CD I could find only a reference to commit in the TEXT.COPY command. But this is so old I am not sure what has changed.

Mark

spartacus
24th July 2003, 16:09
Summary (my experience)
(forget my first posting in this thread, it will confuse you)

1. Text functions need transactions (abort or commit)

2. If you abort a transaction, there is still a entry in tttxt001 and the text maintenance visible. But that entry disappears if you open the text with the editor (at least on our system). So in fact abort ist working correct, but maybe looking a little strange :)

3. Don't know what happens if one forget the transcation. And I wont't try that anymore, because I produced too much table looks the last days :rolleyes:

Spartacus