Home » Developer & Programmer » Forms » FRM-50016: Legal characters are 0-9-+E
FRM-50016: Legal characters are 0-9-+E [message #418331] Fri, 14 August 2009 03:58 Go to next message
hssk12
Messages: 4
Registered: August 2009
Junior Member
In Oracle Forms6i I Have a Item which is Number Datatype. When i Enter Characters it is saying the following error




FRM-50016: Legal characters are 0-9-+E.



That is it says us to enter only numbers as it is number datatype. How to

check for it if i write characters.


Can anyone help me
Re: FRM-50016: Legal characters are 0-9-+E [message #418339 is a reply to message #418331] Fri, 14 August 2009 04:24 Go to previous messageGo to next message
cookiemonster
Messages: 13938
Registered: September 2008
Location: Rainy Manchester
Senior Member
I really don't understand your problem.

It is checking for characters and stopping you.
What do you want it to do instead?
Re: FRM-50016: Legal characters are 0-9-+E [message #418342 is a reply to message #418331] Fri, 14 August 2009 04:48 Go to previous messageGo to next message
hssk12
Messages: 4
Registered: August 2009
Junior Member
Hi
Sir,
Atcually i want to insert charaters, but i have given datatype has number.But while entering the data it should be charater,When it saves that form,it must save as sl_no.


Thanks
Re: FRM-50016: Legal characters are 0-9-+E [message #418343 is a reply to message #418331] Fri, 14 August 2009 04:52 Go to previous messageGo to next message
cookiemonster
Messages: 13938
Registered: September 2008
Location: Rainy Manchester
Senior Member
If you want to enter characters you need to use a character data type.
Re: FRM-50016: Legal characters are 0-9-+E [message #418345 is a reply to message #418331] Fri, 14 August 2009 05:08 Go to previous messageGo to next message
hssk12
Messages: 4
Registered: August 2009
Junior Member
Hi
Sir,
This is my table
create table convey_reg(
sl_no number(15) primary key,
doc_date date not null,
doc_no number(7) not null,
emp_sl_no number(14) not null references emp(sl_no),
from_date date not null,
to_date date not null,
mode_tr_sl number(14) not null references dcode(sl_no),
amount number(14,2)
);
I am facing problem in the coulmn mode_tr_sl,actual this column is referenced to dcode(sl_no),so while entering data
i have to enter code,after entering code it should save to sl_no.


Thanks
Re: FRM-50016: Legal characters are 0-9-+E [message #418366 is a reply to message #418345] Fri, 14 August 2009 07:09 Go to previous messageGo to next message
cookiemonster
Messages: 13938
Registered: September 2008
Location: Rainy Manchester
Senior Member
hssk12 wrote on Fri, 14 August 2009 11:08

I am facing problem in the coulmn mode_tr_sl,actual this column is referenced to dcode(sl_no),so while entering data
i have to enter code,after entering code it should save to sl_no.



What code from where?

I suspect you need to use a list item. That'll allow to to display one value on screen but store a differennt value in the database.
Re: FRM-50016: Legal characters are 0-9-+E [message #418368 is a reply to message #418331] Fri, 14 August 2009 07:27 Go to previous messageGo to next message
hssk12
Messages: 4
Registered: August 2009
Junior Member
Hi
Sir,
This is my coding for that column
KEY NEXT ITEM
declare
a number(14);

begin
select sl_no into a from dcode where sl_no=:convey_reg.mode_tr_sl;
exception
when no_data_found then
g.cent(sqlerrm);
end;

(But i should not use list item,without list item i have to do)


Thanks
Re: FRM-50016: Legal characters are 0-9-+E [message #418375 is a reply to message #418331] Fri, 14 August 2009 07:45 Go to previous message
cookiemonster
Messages: 13938
Registered: September 2008
Location: Rainy Manchester
Senior Member
1) Validation code should go in WHEN-VALIDATE-ITEM not KEY-NEXT-ITEM. KEY-NEXT-ITEM can be bypassed (with the mouse for starters).

2) Variables should always be typed to the database column they're populated from. So:
a number(14);

Should be:
a dcode.sl_no%TYPE;

A more meaningfull name than a would also be a good idea.

3) what datatype is dcode.sl_no?

4) How is any of this relevant to wanting to enter characters in a number field?
Previous Topic: Automatically Attach RP2RRO
Next Topic: Issue in creating control Items at Run time.
Goto Forum:
  


Current Time: Fri Sep 20 08:18:22 CDT 2024