Sending arrays from Forms to Oracle PL/SQL
Hi All,
I'm stuck up in an urgent requirement where I want to send an array of values(eg., PL/SQL table) with a number of rows say 100 from Forms 6i to Oracle PL/SQL. PL/SQL table is based on a record type consists of a number of columns say 10.
The actual scenario is that, Forms interactive screen (multiple record block) does validations on the values entered by users and then it should send all the rows together to a Stored Procedure or Packaged procedure. Packaged procedure receives the PL/SQL table, does processing on the data values of the PL/SQL table and send it back to Forms 6i.
Please help me in getting the solution on this urgent problem. There is a flexibility of using any kind of arrays, it can be PL/SQL, Nested table or varrays.
Thanks.
hi,
I want to give n-array elements from a forms6i application to
a stored package at the same time. I want to work with n-array
elements in my stored package >>mypackage<<, because I want to sort the
array elements in a stored package. Now >>mypackage<< works only with
one array-element, but I need n-elements. First I start a test with
a procedure and a package.
-- Later >>element<< should be a program unit in Forms6i
CREATE OR REPLACE PROCEDURE element IS
TYPE tab_spoolfile IS TABLE OF VARCHAR2(100) INDEX BY BINARY_INTEGER;
t_file tab_spoolfile;
BEGIN
t_file(1):= 'abc_00017_cba'; -- 1.
t_file(2):= 'xyz_00002_zyx'; -- 2.
t_file(3):= 'efg_99999_gfe'; -- 3.
t_file(4):= 'mno_00115_onm'; -- 4.
t_file(5):= 'hij_00088_jih'; -- 5.
FOR i IN t_file.FIRST..t_file.LAST
LOOP
out('Element: '||t_file(i));
mypackage.my_procedure(mypackage.tab_array(t_file(i)),null);
END LOOP;
END;
CREATE OR REPLACE PACKAGE MyPackage AS
TYPE tab_array IS TABLE OF VARCHAR2(300);
t_file tab_array;
PROCEDURE my_procedure(in_values IN tab_array, p_param VARCHAR2);
END MyPackage;
CREATE OR REPLACE PACKAGE BODY MyPackage AS
i BINARY_INTEGER:= 1;
PROCEDURE my_procedure(in_values IN tab_array, p_param VARCHAR2) IS
BEGIN
IF in_values.EXISTS(i)
THEN
out('Sort : '||in_values(i));
END IF;
END;
END MyPackage;
SQL> exec element
Element: abc_00017_cba
Sort : abc_00017_cba
Element: xyz_00002_zyx
Sort : xyz_00002_zyx
Element: efg_99999_gfe
Sort : efg_99999_gfe
Element: mno_00115_onm
Sort : mno_00115_onm
Element: hij_00088_jih
Sort : hij_00088_jih
Does anybody have an idea?
Best regards,
Tom
Similar Messages
-
NEED TO SEND MAIL FROM FORMS...
DEAR ALL,
I NEED TO SEND MAIL FROM FORMS WHEN I PRESS THE MAIL BUTTON.
I HAVE NO IDEA FOR THIS CRITERIA. IF ANY ONE EXPERIENCED WITH
THIS CRITERIA, PLS HELP ME AND GIVE ME THE CODING FOR THAT.
AND ALSO PLS EXPLAIN EACH LINE OF CODING, WHICH U POST.
THANKS IN ADVANCE
S.BERNANDASYour requirement can be done in forms. Good amounts of advice here. There 244 messages this year alone that fit the search criteria in the Oracle Forms forum.
-
Migration Error from Access to Oracle through SQL Developer.
Hi,
Actually I am trying to migrate data from MS Access 2002 to Oracle 9i database through the SQL Developer. But Whenever I go to Capture Database from Access it will show me an error.... Invalid procedure Call and then it shows an error message... >>>>>>
ShowSplashScreen("_OracleSplashScreen",3)
after that i wont be able to do this task anymore..... So please help me get out of it... How Cam I Maigrate data from Access to Oracle 9i...
Is any other tool i use or you can help me for this tool to migrate date...
Please tell me..
If yu can send me a mail then mail me on [email protected]
regards,
VishalHi Vishal,
I have responded to your related thread on the Migration Workbench forum - Migration Error from Access to Oracle through SQL Developer.
Regards,
Hilary -
Do you know how to send mail from forms?
Thank youUTL_SMTP
UTL_SMTP is designed for sending e-mail over Simple Mail Transfer Protocol (SMTP). It does not have the functionality to implement an SMTP server for mail clients to send e-mail using SMTP.
http://download-west.oracle.com/docs/cd/B10501_01/appdev.920/a96612/u_smtp.htm#ARPLS074
Joel Pérez -
Hi All!
I have a .dll named "SIMCom.dll", which perform following function:
1. Send SMS from Form like a party want to get own balance then overall balance can be send from forms using this .DLL.
2. It is a VB made dll file which send SMS from VB interface forms.
3. Now, I want to use this file from Oracle Forms 6i for sending short messages, what should I do? OR any other solution to achieve this task.
Waqas,Have a look at the Oracle Forms ORA_FFI Package.
-
Who send mail from Forms 6i Builder?????
I need send mail from Forms 6i Builder
Please help me.
Write me to [email protected]
thanks.I need send mail from Forms 6i Builder
Please help me.
Write me to [email protected]
thanks. -
How can i send emails from forms
I need to be able to send emails from forms 6.(assuming the pc is running Outlook) What is the best way of doing this? Would OLE or DDE control of Outlook be the easiest method?
If anyone has done this please let me know.See:
iOS: Unable to send or receive email
I would Google for:
setup verizon email on phone
for the settings to use. -
Help: how to send emails from FORMS?
Are there simple steps to send emails from FORMS?
Thank you in advance.
JimmyI'm sure there are many ways to send emails from Forms. Personally I never had to do this, but I can imagine following ways.
a) use UTL_SMTP-Package to send the email via your database
b) use a Java-Call
Peter -
How to send mail from FORMS and PL/SQL
I want to send a mail from forms + PL/sql.
I do not want to create a new C program and to make it as USER_EXIT.
The called function suppose to send it through the default email method as per the NT or UNIX setup.
ThanksThanks for your reply.
It requires JServer. We have many clinets around the world and some of them are still running Oracle 7.3.
Any other sleek solution? -
ORA-00932 when trying to pass ARRAY from Java SP to PL/SQL
Hi all
I am trying to pass ARRAYs back and forth between PL/SQL and Java stored procedures. But I keep getting:
ORA-00932: inconsistent datatypes: expected a return value that is an instance of a user defined Java class convertible to an Oracle type got an object that could not be converted
Here's my PL/SQL:
create or replace type CONTENTP.sentences_array as VARRAY(1000) of CLOB
-- I've also tried .. as TABLE of CLOB and varray/table of VARCHAR2
declare
proc_clob CLOB;
arr SENTENCES_ARRAY;
begin
SELECT document_body
into proc_clob
from documents
where document_id = 618784;
arr := processdocument.sentencesplit (proc_clob);
end;
PROCESSDOCUMENT package definition:
CREATE OR REPLACE PACKAGE CONTENTP.PROCESSDOCUMENT AS
FUNCTION sentenceSplit(Param1 CLOB)
return SENTENCES_ARRAY
AS
LANGUAGE java
NAME 'com.contentp.documents.ProcessDocument.sentenceSplit(oracle.sql.CLOB) return oracle.sql.ARRAY';
FUNCTION removeHTML(Param1 CLOB)
return CLOB
AS
LANGUAGE java
NAME 'com.contentp.documents.ProcessDocument.removeHTML(oracle.sql.CLOB) return oracle.sql.CLOB';
end;
Java sentenceSplit code:
public static oracle.sql.ARRAY sentenceSplit ( CLOB text) throws IOException, SQLException
Connection conn = new OracleDriver().defaultConnection();
String[] arrSentences = sent.getsentences ( CLOBtoString (text) );
ArrayDescriptor arrayDesc =
ArrayDescriptor.createDescriptor ("SENTENCES_ARRAY", conn);
ARRAY ARRSentences = new ARRAY (arrayDesc, conn, arrSentences);
return ARRSentences;
I have confirmed that the String[] arrSentences contains a valid string array. So the problem seems to be the creation and passing of ARRSentences.
I have looked at pages and pages of documents and example code, and can't see anything wrong with my declaration of ARRSentences. I'm at a loss to explain what's wrong.
Thanks in advance - any help is much appreciated!I am trying to do something similar but seems like getting stuck at registerOutParameter for this.
Type definition:
CREATE OR REPLACE
type APL_CCAM9.VARCHARARRAY as table of VARCHAR2(100)
Java Stored Function code:
public static ARRAY fetchData (ARRAY originAreaCds, ARRAY serviceCds, ARRAY vvpcs) {
Connection connection = null;
ARRAY array = null;
try {
connection = new OracleDriver ().defaultConnection();
connection.setAutoCommit(false);
ArrayDescriptor adString = ArrayDescriptor.createDescriptor("VARCHARARRAY", connection);
String[] result = new String [2];
result[0] = "Foo";
result[1] = "Foo1";
array = new ARRAY (adString, connection, result);
connection.commit ();
return array;
} catch (SQLException sqlexp) {
try {
connection.rollback();
} catch (SQLException exp) {
return array;
Oracle Stored Function:
function FETCH_TRADE_DYN_DATA (AREA_CDS IN VARCHARARRAY, SERVICE_CDS IN VARCHARARRAY,VV_CDS IN VARCHARARRAY) return VARCHARARRAY AS LANGUAGE JAVA NAME 'com.apl.ccam.oracle.js.dalc.TDynAllocation.fetchData (oracle.sql.ARRAY, oracle.sql.ARRAY, oracle.sql.ARRAY) return oracle.sql.ARRAY';
Java Code calling Oracle Stored Procedure:
ocs = (OracleCallableStatement) oraconn.prepareCall(queryBuf.toString());
ArrayDescriptor adString = ArrayDescriptor.createDescriptor("VARCHARARRAY", oraconn);
String[] originAreaCds = sTDynAllocationVO.getGeogAreaCds();
ARRAY areaCdArray = new ARRAY (adString, oraconn, originAreaCds);
ocs.registerOutParameter(1, OracleTypes.ARRAY);
ocs.setArray (2, areaCdArray);
String[] serviceCds = sTDynAllocationVO.getServiceCds();
ARRAY serviceCdsArray = new ARRAY (adString, oraconn, serviceCds );
ocs.setArray (3, serviceCdsArray);
String[] vvpcs = sTDynAllocationVO.getVesselVoyagePortCdCallNbrs();
ARRAY vvpcsArray = new ARRAY (adString, oraconn, vvpcs);
ocs.setArray (4, vvpcsArray);
ocs.execute();
ARRAY results = ocs.getARRAY(1);
Error I get:
Parameter Type Conflict: sqlType=2003
Thanks for help in advance. -
hi all,
can any help in this,
i want send a mail from forms 10g,how???
thanx in advace,
chandshi,
my oracle version is 10.1.0.4.2
this is my code....
PROCEDURE Send_Mail_001 (sender IN VARCHAR2,
recipient IN VARCHAR2,
subject IN VARCHAR2,
message IN VARCHAR2)
IS
mailhost VARCHAR2(30) := '10.192.30.12';
mail_conn utl_smtp.connection;
TEST VARCHAR2(100);
crlf VARCHAR2(2):= CHR( 13 ) || CHR( 10 );
mesg VARCHAR2(2000);
BEGIN
mail_conn := utl_smtp.open_connection(mailhost,25);
utl_smtp.helo(mail_conn, mailhost);
utl_smtp.mail(mail_conn, sender);
utl_smtp.rcpt(mail_conn, recipient);
mesg:= 'Date: ' || TO_CHAR( SYSDATE, 'dd Mon yy hh24:mi:ss' ) || crlf ||
'From: ' || sender || crlf ||
'To: ' || recipient || crlf ||
'Subject: '|| subject || crlf;
mesg:= mesg || ' ' || crlf || crlf || message ||'.' || crlf || '.'|| crlf;
UTL_SMTP.OPEN_DATA(mail_conn);
utl_smtp.write_data (mail_conn, mesg);
/* body of email with multiple
utl_smtp.write_data (v_mail_conn, v_message);
call to write_data
utl_smtp.write_data (mail_conn, mesg);
UTL_SMTP.CLOSE_DATA(mail_conn);
utl_smtp.quit(mail_conn);
premia_wf_log('mail','hi');
EXCEPTION
WHEN OTHERS THEN
premia_wf_log('mail',sqlerrm);
END;
can u help me in this..........
thanx in advance
chands -
Can anybody send me a code how to send an email from forms
with attachement for multiple users
I am using oracle 8i and forms 6i
My mail application is Novel group wise
Thanks for your helpOracle Reports can be run directly to email.
Check out the DESTYPE parameter.
To send emails you can use a call to Java Mail using the Java importer. There is a sample form for this in the Oracle9i Forms demos. This should work in 6i also.
You might also be able to use email from the database with the UTL_SMTP package:
http://otn.oracle.com/sample_code/tech/pl_sql/htdocs/maildemo8i_sql.txt -
Need open REPORT from FORM in Oracle Apps with Parameters
Hello All,
I have a custom Form, which is running fine in stand alone by invoking the report from it.
There is a code in behind the button which triggers to open the report having parameters.
Here we used RUN_PRODUCT function to invoke the form.
Now when i register this same form in Oracle Apps environment, we are able to see the form,but when clicked to button, its erroring at RUN_PRODUCT
Please let me know the workaround on this.
Appreciate your support.
Thanks.Hi,
I have the rdf at the location at a particular unix server ( 10.10.10.10 say) at /abc/efg/OPENFORM.rdf
This is the Test Instance server for Oracle Applications.
How do I put this in we.show_document ? -
My requirement is to send mail/intimation from forms in case of promotion/appraisal of employee is done.
Plz tell how to do this.
Regards,
Alokyou can send emails in forms through various techniques. External programs like qmail.exe or something else.
In the newer databases you have the functionality to send emails in the db.
Search this forum for utl_smtp. There are many postings with sourcecode -
Sending email from forms using 'from'
I'm trying to send an email from forms. It goes well, but I like to use the 'from' field from Outlook. How can I use it in OLE? I have searched everywhere, but can't find it.
It seems to me it is something like the way you do with BCC and CC options, but I haven't found a way to do the same thing with the From field. Can anyone help?
Thanks,
Pauline KooyFabrizio,
Are you just sending the Line Feed character 'CHR(10)"? I typically send the Carrage Return character 'CHR(13)' as well. I'll create a variable called CRLF and assign the Carrage Return and Line Feed characters to this variable. Then reference the CRLF variable when I want to embed a new line.
For example:
DECLARE
crlf VARCHAR2(2) := chr(13)||chr(10);
v_msg_body VARCHAR2(2000);
BEGIN
v_msg_body := 'lots of text here'||crlf;
END;Hope this helps.
Craig...
Maybe you are looking for
-
Deleted Items Appearing on the FBL3n Report for Open Items
Hi All We just went live and I am facing a huge issue; I deleted many migration entries from loads of GL Accounts for multiple Co Codes, but on the FBL3n report, whenI execute with the option of 'Open Items' only, I still see the deleted items with
-
COM Problem windows7 & Photoshop CS5
Hello, I am having a bit of a problem with instancing com objects for both photoshop x64 and x32 versions. both of which I have installed, and need available, due to legacy 32 bit plugins our studio relies upon for certain things. The problem is that
-
Web Gallery, previous/ next not working consistently
First time I've seen this: next and previously are not working good. Some work in the gallery, some don't. Reboot Firefox, some different ones work, some dont. It's worrisome. I'm sending this to people- any tips?
-
Customise button wording for 'NEXT' that appears with Photo Gallery Thumbnails
Is it possible to customise the wording of the 'NEXT' button that appears with the photo gallery thumbnails? ie, if you only have 5 thumbnails on page, but the gallery has more pics, a NEXT button is generated, but we'd like it to say MORE IMAGES ins
-
I have just putchased a 5th generation Ipod Nano and when I synced it with my Itunes library I cannot get the Videos to go onto the Ipod. How can I get my ENTIRE iTunes library over to my new iPod