Home » Developer & Programmer » Forms » insert
insert [message #119530] Fri, 13 May 2005 03:52 Go to next message
jonmich005
Messages: 53
Registered: April 2005
Member
I have a while...loop structure.
It works fine without my procedure comment.

But if I put my procedure comment in it, it doesn't work.
Here is that procedure:

BEGIN

if not :lds_tl_grid.tl_grid_com_id is null then

select distinct lds_tl_comment.tl_comm_name
into :global.comm
from lds_tl_comment,lds_tl_grid,lds_interval_tasklist
where lds_tl_comment.tl_comm_id = :lds_tl_grid.tl_grid_com_id
and lds_tl_comment.tl_comm_veh_id = :global.vehicle;

:global.it := :global.itl+1;
message(:global.it);
insert into lds_interval_tasklist values(:global.vehicle,:global.scenario,:global.t,:global.it,'=> '||:global.comm,:lds_tl_grid.tl_grid_area_id,'C');

end if;

END;

If I put my insert statement as comment, it works, this I can see at my message that i showed.
If I run it wih my insert statement it only shows the message one time, so here is the fault.
How does it come???
Does anyone have an idea?


Greetings Jonas
Re: insert [message #119795 is a reply to message #119530] Sun, 15 May 2005 19:34 Go to previous message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
'Message' has a problem in that the last message before an error is not displayed. Either use the same 'message' line twice or put a 'pause' command after it.

I think you may have a data type problem in your insert statement. Either force the data type by using to_char, to_date, etc or use a non-database block eg NDB or CTRL to hold the variables for which you are currently using 'global'.

Which version of forms are you using?

David
Previous Topic: Counting the use of formsmodules
Next Topic: No Records
Goto Forum:
  


Current Time: Thu Sep 19 18:28:21 CDT 2024