camste
26th August 2011, 14:55
Hi gurus,
I have a subsession which based on some values in the calling session inserts values (from tdpur400 and tdpur401) in a table and then displays it as a maintain list session. Everything seems to be fine when I call it. I don't get an error message. A query directly on the database tells me everything is inserted, but they are not displayed in the list in the session however. Just an empty row at the top. When I click on the row everything crashes and I get the error message:
Fatal error: Illegal value for size argument(0) for sym ''
Fatal error: Can not continue in cddev9596s000 in DLL ottstpstandard (ncrs._indexinit)[alloc.mem]

And now I can't open the main session anymore either. I can start it, but whenever I press continue I just get the message "Transaction is on. Cannot continue". And then the session hangs. I just have to kill it using task manager in Windows. And when I start Baan again and open the session I still can't continue. Same message about the transaction. It doesn't show up in the application locks (under tools->database management->miscellaneous) either, so I can't kill whatever it's doing there. A debug shows me that it's the select statement (in the subsession script's zoom.from.all, on.entry section) where it selects from tdpur400 and tdpur401 which causes the transaction error. It doesn't even enter the code inside the selectdo.

I've tried just starting the subsession on it's own. Then I also get the window with just one empty row showing, and pressing the row gives me the same error about "Illegal value for size argument".

The query which makes it crash when I click is simply this:
field.tdpur400.orno:
before.display:
select tdpur400.*, tdpur401.*
from tdpur400, tdpur401
where :cddev100.orno = tdpur400.orno
and tdpur401.orno refers to tdpur400.orno
selectdo
endselect
It steps through it when I open the session, but when I mark the line it crashes.

What can i do with this? Where is the transaction lock? Where can I kill it? And what is causing the "illegal value for size argument" error?

Thank you for any help you'd might be able to give.

Edit: The query was flawed. changed now (but the error remains):
field.tdpur400.orno:
before.display:
select tdpur400.*, tdpur401.*
from tdpur400, tdpur401
where :cddev100.orno = tdpur400.orno
and :cddev100.pono = tdpur401.pono
and tdpur401.orno refers to tdpur400.orno
order by tdpur401.sqnb desc
as set with 1 rows
selectdo
endselect

mark_h
28th August 2011, 18:39
Post the code for the subsession. Usually on a subsession like this in the zoom from section I would set the table values and execute find.

camste
29th August 2011, 12:43
This morning the message about the transaction had disappeared. Maybe it timed out over the weekend. I have no idea.

But I found the error. The reason was that the session script was set to UI script for print/processing session rather than UI script with database handling. Changing that removed the error. I don't know why i was allowed to click inside the editable fields though, but not mark the line. Or what the meaning of the error message was.