Home » Open Source » Programming Interfaces » ora-30550 problem in ole2
ora-30550 problem in ole2 [message #400324] |
Mon, 27 April 2009 10:34 |
mcaricha2006
Messages: 2 Registered: April 2009
|
Junior Member |
|
|
i am getting ora-30550 error ,while pressing button.
kindly help me.
Mail Package Body:
------------------
PACKAGE BODY Mail_pkg IS
session_outbox OLE2.OBJ_TYPE;
session_outbox_messages OLE2.OBJ_TYPE;
message1 OLE2.OBJ_TYPE;
msg_recp OLE2.OBJ_TYPE;
recipient OLE2.OBJ_TYPE;
msg_attch OLE2.OBJ_TYPE;
attachment OLE2.OBJ_TYPE;
procedure logon( Profile IN varchar2 default NULL )is
Begin
session := ole2.create_obj('mapi.session');
/* create the session object */
args := ole2.create_arglist;
ole2.add_arg(args,Profile);/* Specify a valid profile name */
ole2.invoke(session,'Logon',args);
/* to avoid the logon dialog box */
ole2.destroy_arglist(args);
End;
procedure logoff is
Begin
ole2.invoke(session,'Logoff');
/* Logoff the session and deallocate the */
/* resources for all the OLE objects */
ole2.release_obj(session);
ole2.release_obj(session_outbox);
ole2.release_obj(session_outbox_messages);
ole2.release_obj(message1);
ole2.release_obj(msg_recp);
ole2.release_obj(recipient);
ole2.release_obj(msg_attch);
ole2.release_obj(attachment);
End;
procedure send( Recp IN varchar2,
Subject IN varchar2,
Text IN varchar2,
Attch IN varchar2
)is
Begin
/* Add a new object message1 to the outbox */
session_outbox := ole2.get_obj_property(session,'outbox');
session_outbox_messages := ole2.get_obj_property(session_outbox,'messages');
message1 := ole2.invoke_obj(session_outbox_messages,'Add');
ole2.set_property(message1,'subject',Subject);
ole2.set_property(message1,'text',Text);
/* Add a recipient object to the message1.Recipients collection */
msg_recp := ole2.get_obj_property(message1,'Recipients');
recipient := ole2.invoke_obj(msg_recp,'add') ;
ole2.set_property(recipient,'name',Recp);
ole2.set_property(recipient,'type',1);
ole2.invoke(recipient,'resolve');
/* Add an attachment object to the message1.Attachments collection */
msg_attch := ole2.get_obj_property(message1,'Attachments');
attachment := ole2.invoke_obj(msg_attch,'add') ;
ole2.set_property(attachment,'name',Attch);
ole2.set_property(attachment,'position',0);
ole2.set_property(attachment,'type',1); /* 1 => MAPI File Data */
ole2.set_property(attachment,'source',Attch);
/* Read the attachment from the file */
args := ole2.create_arglist;
ole2.add_arg(args,Attch);
ole2.invoke(attachment,'ReadFromFile',args);
ole2.destroy_arglist(args);
args := ole2.create_arglist;
ole2.add_arg(args,1); /* 1 => save copy */
ole2.add_arg(args,0); /* 0 => no dialog */
/* Send the message without any dialog box, saving a copy in the Outbox */
ole2.invoke(message1,'Send',args);
ole2.destroy_arglist(args);
message('Message successfully sent');
End;
END;
2. Create a block called MAPIOLE with the following canvas layout:
|-------------------------------------------------------------|
| |
| Exchange Profile: |====================| |
| |
| To: |============================| |
| |
| Subject: |============================| |
| |
| Message: |============================| |
| | | |
| | | |
| | | |
| | | |
| | | |
| |============================| |
| |-----| |
| Attachment: |============================| |SEND | |
| |-----| |
|-------------------------------------------------------------|
The layout contains 5 text-itmes:
- Profile
- To
- Subject
- Message (multiline functional property set to true)
- Attach
and a 'Send' button with the following WHEN-BUTTON-PRESSED trigger:
---------------------------
mail_pkg.logon(:profile);
mail_pkg.send(:to,:subject,:message,:attch);
mail_pkg.logoff;
[Mod-Edit: Frank added [code]-tags to improve readability]
[Updated on: Mon, 27 April 2009 10:45] by Moderator Report message to a moderator
|
|
|
Re: ora-30550 problem in ole2 [message #400325 is a reply to message #400324] |
Mon, 27 April 2009 10:42 |
|
Michel Cadot
Messages: 68729 Registered: March 2007 Location: Saint-Maur, France, https...
|
Senior Member Account Moderator |
|
|
ORA-30550: index depends on a package/function spec/body which is not valid
*Cause: the functional indexes depends on some invalid/non-existent
package/function spec/body
*Action: verify that all the package/functions which the index depends on
exist and are valid
Please read OraFAQ Forum Guide, especially "How to format your post?" section.
Make sure that lines of code do not exceed 80 characters when you format.
Indent the code (See SQL Formatter), use code tags.
Use the "Preview Message" button to verify.
Also always post your Oracle version (4 decimals).
Regards
Michel
[Updated on: Mon, 27 April 2009 10:43] Report message to a moderator
|
|
|
|
Goto Forum:
Current Time: Thu Jan 02 09:08:05 CST 2025
|