Home » Developer & Programmer » Forms » Key next item (Form 6i)
Key next item [message #521124] Fri, 26 August 2011 08:33 Go to next message
shahzad-ul-hasan
Messages: 617
Registered: August 2002
Senior Member
Dear Sir,
Table Structure:
Name of Table: info
Column: ID, Name, Cell,Cell1,Ref
i want to insert these values in a table through ref (key next item).
-----------------------------------------------------------
Key next Item Triger Code:
DECLARE
A NUMBER;
B NUMBER;
BEGIN
SELECT :CELL,:CELL1 INTO A,B FROM DUAL;
insert into out (receiver,msg,id,status)
values
('+'||a,'Respected Parents! Your Child has been given admission in ICON College Chiniot.
ICON shall produce better result than your expectations INSHALLAH...be an ICON',:info.id,'send');
insert into out (receiver,msg,id,status)
values
('+'||B,'Respected Parents! Your Child has been given admission in ICON College Chiniot.ICON shall produce better result than your expectations INSHALLAH...be an ICON',:info.id,'send');
COMMIT;
NEXT_BLOCK;
END;
-------------------------------------------------------
but when i press enter(ref Key_next_item) it will return error:
FRM-40735: KEY_NEXT_ITEM RAISED UNHANLEDED EXCEPTION ERROR: ORA 40102

PLS ADVISED. i want to send thses msg in out table.pls advised.
Re: Key next item [message #521127 is a reply to message #521124] Fri, 26 August 2011 08:44 Go to previous messageGo to next message
cookiemonster
Messages: 13926
Registered: September 2008
Location: Rainy Manchester
Senior Member
Are you sure it's ORA-40102?
40102, 00000, "invalid input %s for data mining operation %s"
// *Cause:  The input parameter is either null or invalid for the given
//          operation.
// *Action: Provide a valid value. Check range for NUMBER parameters.


Try doing the insert from sqlplus and see what happens.
Re: Key next item [message #521172 is a reply to message #521124] Fri, 26 August 2011 13:10 Go to previous messageGo to next message
joy_division
Messages: 4963
Registered: February 2005
Location: East Coast USA
Senior Member
Why not give us proper setup information like the table columns with datatypes? It think it is much easier to do a decscribe and cut and paste than to type it out in an unformatted manner, which is ripe for error.

A and B are number, so you do not concatenate numbers to strings.
A and B are just variables holding form fields, so why not use the form field instead of having to load them into variables?
Re: Key next item [message #521217 is a reply to message #521172] Fri, 26 August 2011 22:21 Go to previous messageGo to next message
shahzad-ul-hasan
Messages: 617
Registered: August 2002
Senior Member
Dear
pls find the full table structure:
Table Name: info: Coloumn Data
id number 11001
Name Varchar2(200) Moni
Cell Number(17) 923216644029
Cell1 Number(17) 923336701973
-----------------------------------------------------------------
I have tried that also.
DECLARE
BEGIN
insert into out (receiver,msg,id,status)
values
('+'||:cell,'Respected Parents! Your Child has been given admission in ICON College Chiniot.
ICON shall produce better result than your expectations INSHALLAH...be an ICON',:info.id,'send');
insert into out (receiver,msg,id,status)
values
('+'||:cell1,'Respected Parents! Your Child has been given admission in ICON College Chiniot.ICON shall produce better result than your expectations INSHALLAH...be an ICON',:info.id,'send');
COMMIT;
NEXT_BLOCK;
END;
-------------------------------------------------------
but when i press enter(ref Key_next_item) it will return error:
FRM-40735: KEY_NEXT_ITEM RAISED UNHANLEDED EXCEPTION ERROR
pls advised.


Re: Key next item [message #521218 is a reply to message #521124] Fri, 26 August 2011 22:44 Go to previous messageGo to next message
azamkhan
Messages: 557
Registered: August 2005
Senior Member
Did you mentioned any of the item property "Lowest Allowed Value" and "Highest Allowed Value".
Re: Key next item [message #521231 is a reply to message #521218] Sat, 27 August 2011 01:58 Go to previous messageGo to next message
shahzad-ul-hasan
Messages: 617
Registered: August 2002
Senior Member
no valued mention.
Re: Key next item [message #521232 is a reply to message #521231] Sat, 27 August 2011 02:03 Go to previous messageGo to next message
shahzad-ul-hasan
Messages: 617
Registered: August 2002
Senior Member
insert into ozekimessageout(receiver,msg,id,status)
values
('+'||923326618402,'Respected Parents! Your Child has been given admission in ICON College Chin
ICON shall produce better result than your expectations INSHALLAH...be an ICON',11001,'send');
this query works in SQL*Plus
Re: Key next item [message #521234 is a reply to message #521232] Sat, 27 August 2011 03:11 Go to previous messageGo to next message
azamkhan
Messages: 557
Registered: August 2005
Senior Member
What is the data type of Receiver column?
Re: Key next item [message #521248 is a reply to message #521234] Sat, 27 August 2011 09:09 Go to previous messageGo to next message
shahzad-ul-hasan
Messages: 617
Registered: August 2002
Senior Member
Reciever Datatype is number.
But for one cell it is OK. and always save the message in the table.but when i add cell1.it will gives key_next_item error.

[Updated on: Sat, 27 August 2011 09:11]

Report message to a moderator

Re: Key next item [message #521334 is a reply to message #521248] Sun, 28 August 2011 23:37 Go to previous messageGo to next message
azamkhan
Messages: 557
Registered: August 2005
Senior Member
My dear friend,

You are trying to store following data:

'+'||923326618402

In a number data type.

The problem is that you are trying to store a character in a number data type i.e '+'

If you want to store the Plus sign with you numbers then you have to take it as a Char or Varchar2 datatype.
Re: Key next item [message #521361 is a reply to message #521334] Mon, 29 August 2011 04:41 Go to previous messageGo to next message
shahzad-ul-hasan
Messages: 617
Registered: August 2002
Senior Member
Dear
i have changed my datatype to varchar2(30).but its not working same error occured.

[Updated on: Mon, 29 August 2011 04:44]

Report message to a moderator

Re: Key next item [message #521439 is a reply to message #521361] Mon, 29 August 2011 23:02 Go to previous messageGo to next message
azamkhan
Messages: 557
Registered: August 2005
Senior Member
What is your insert statment now?
Re: Key next item [message #521475 is a reply to message #521439] Tue, 30 August 2011 04:31 Go to previous message
cookiemonster
Messages: 13926
Registered: September 2008
Location: Rainy Manchester
Senior Member
Try doing the insert in sqlplus and see what happens.
Previous Topic: illegal restricted procedure error.
Next Topic: Horizontal and Vertical Scroll Bar
Goto Forum:
  


Current Time: Fri Jul 26 08:22:23 CDT 2024