Home » Developer & Programmer » Forms » Package Define problem
icon14.gif  Package Define problem [message #587684] Tue, 18 June 2013 02:13 Go to next message
mist598
Messages: 1195
Registered: February 2013
Location: Hyderabad
Senior Member
Hi,

subprogram or cursor 'DEFINE' is declare in a package spec and must be define in the package Body and i attached screen shot

Can any one please help me?


Thanks,
Siva
  • Attachment: image1.png
    (Size: 64.22KB, Downloaded 650 times)
Re: Package Define problem [message #587685 is a reply to message #587684] Tue, 18 June 2013 02:16 Go to previous messageGo to next message
Michel Cadot
Messages: 68643
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Check if the number and type of the parameters are the same ones in the package specification and the body.

Regards
Michel
Re: Package Define problem [message #587687 is a reply to message #587685] Tue, 18 June 2013 02:26 Go to previous messageGo to next message
mist598
Messages: 1195
Registered: February 2013
Location: Hyderabad
Senior Member
Thanks for reply,

I am not created any parameters, i am confusing about this and could u please suggest me?

Thanks,
Siva
Re: Package Define problem [message #587688 is a reply to message #587687] Tue, 18 June 2013 02:34 Go to previous messageGo to next message
Littlefoot
Messages: 21807
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Yes, you DO use parameters. One, actually:
block IN varchar2


It seems that you didn't understand what Michel said. Package specification & body MUST match.
package folders is
  procedure define (block in varchar2);          --> this ...
...

package body folders is
  procedure define (block in varchar2) is        --> ... and this must match
...

[Updated on: Tue, 18 June 2013 02:36]

Report message to a moderator

Re: Package Define problem [message #587690 is a reply to message #587688] Tue, 18 June 2013 02:44 Go to previous messageGo to next message
mist598
Messages: 1195
Registered: February 2013
Location: Hyderabad
Senior Member
Thanks,

I created block as a parameter and set the parameter data type as " char", again i got same error..

Thanks&Regards,
Siva
Re: Package Define problem [message #587693 is a reply to message #587690] Tue, 18 June 2013 02:50 Go to previous messageGo to next message
Littlefoot
Messages: 21807
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
There's nothing I'd like to add to my previous message.
Re: Package Define problem [message #587697 is a reply to message #587690] Tue, 18 June 2013 02:58 Go to previous messageGo to next message
mist598
Messages: 1195
Registered: February 2013
Location: Hyderabad
Senior Member
Thank u Littlefoot,

I forgot to add this in Package Spec(block in varchar2);


Re: Package Define problem [message #587744 is a reply to message #587697] Tue, 18 June 2013 06:20 Go to previous messageGo to next message
mist598
Messages: 1195
Registered: February 2013
Location: Hyderabad
Senior Member
Hi Littlefoot,

I have another question about Package, i wrote in
when-new-form-instance(form)-->>folders.define; (package name.procedure name),
i got error like that "wrong number or types of arguments in call to "DEFINE",
could you please help me...

Thanks,
Siva
  • Attachment: image1.png
    (Size: 64.15KB, Downloaded 665 times)
Re: Package Define problem [message #587746 is a reply to message #587744] Tue, 18 June 2013 06:24 Go to previous message
Littlefoot
Messages: 21807
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
You didn't provide procedure's parameter value. As you created is as
package folders is
  procedure define (block in varchar2);
then you have to call it the same way:
folders.define('some_value_goes_here');
Previous Topic: how to pass excel general value to database tables date field
Next Topic: where to create dblink?
Goto Forum:
  


Current Time: Tue Apr 23 08:54:24 CDT 2024