Home » Developer & Programmer » Forms » Is there a length on global variables (forms 6i)
Is there a length on global variables [message #332159] Mon, 07 July 2008 12:28 Go to next message
deahayes3
Messages: 203
Registered: May 2006
Senior Member

I am adding to a global variable in a form everytime a button is pressed, when the global variable gets to a certain number it gives me an error ORA-06502, is there a maximum length on global variables:
:global.old_emp_no := nvl(:control_x.empl_num_view, 0)||', '||:global.old_emp_no;

:global.old_emp_no:= vnum;

when I am finished adding to the global variable I use it in a query
Set_Block_Property('BSI_EMPL_MASTER_V',DEFAULT_WHERE,'employee_number IN ('||rtrim(vnum,', ')||') '||'ORDER BY EMPLOYEE_NUMBER');

Re: Is there a length on global variables [message #332177 is a reply to message #332159] Mon, 07 July 2008 14:41 Go to previous messageGo to next message
Littlefoot
Messages: 20891
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
As Forms Online Help System suggests,
Quote:
A global variable stores a character string of up to 255 characters in length.
Re: Is there a length on global variables [message #332184 is a reply to message #332177] Mon, 07 July 2008 15:14 Go to previous messageGo to next message
deahayes3
Messages: 203
Registered: May 2006
Senior Member

thanks, but do you have any idea of why I am getting an unhandled exception when, my variable vnnum gets larger, i am also getting ora-06502

What I am doing is the user is selecting employees from a list the employee id number is takend and stored in vnum, with concatenation I add a comma, when the user adds more than 40 employee id numbers i get the above error, Im thinking my variable vnum may not be large enough (vnum varchar2(32600)) is there another datatype or way I can accept large amounts of data from the user?
Re: Is there a length on global variables [message #338740 is a reply to message #332184] Tue, 05 August 2008 20:37 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Have you solved your problem?

David
Re: Is there a length on global variables [message #339831 is a reply to message #338740] Fri, 08 August 2008 15:23 Go to previous messageGo to next message
deahayes3
Messages: 203
Registered: May 2006
Senior Member

No I havent.
Re: Is there a length on global variables [message #341209 is a reply to message #339831] Sun, 17 August 2008 21:04 Go to previous message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Use multiple fields. Test the length on the current field and if it is nearly full then place the new selection criteria into the next field.

I would also consider using a table to store the information that is used in the query. That way, Oracle can use indexes and other database features to make the query more efficient.

David
Previous Topic: Permanent format mask for a TIME text item
Next Topic: how could I use MENU to call report
Goto Forum:
  


Current Time: Sun Dec 04 10:24:31 CST 2016

Total time taken to generate the page: 0.07236 seconds