Creating an Oracle API

Hello All,
I have a question in mind. Is it possible to write an Oracle API? It could be any generic function that is going to be used frequently. As I have read, API's are executed much faster than the Stored Procedures.
Please do give suggestions if it is possible.
Regards,
P.

API is an abstract concept.
In Oracle, an API will be implemented as stored procedures (typically in packages).
In Windows, an API can be written in C/C++/Delphi/etc and implemented as a DLL (dynamic link library).
In Linux/Unix, an API can be written in C/C++/Pascal/etc and implemented as a SO (shared object library).
In other words, API is implemented as code. Just like any other software.
So why should code written to function as an API be faster than code written for an application?
Why would an API PL/SQL procedure be faster than a normal application procedure?
Whatever you have read is WRONG, or you have INCORRECTLY understood what you have read.

Similar Messages

  • Oracle APIs For Contacts and Role Responsibility

    Hello,
    Please, I need a direction on how to proceed about the use of the right API. I'm working with Oracle EBS R12. If this is not the place for this kind of doubt, please let me know the best one.
    I already have a site for a customer, which was created by the ra_customers_interface_all, after loading the data and processing the interface.
    Now I need to create (using Oracle APIs) a contact name, which will have at least a telephone number and an e-mail address.
    I know that the contact name will be in table HZ_PARTIES, but later it will be related to a site. The registry that will be used for this has the Party_Type value equals to 'PARTY_RELATIONSHIP', according to what the customers interface did after being executed.
    Then the telephone number and e-mail address will be in table HZ_CONTACT_POINTS. The Owner_Table_Name of it has to be 'HZ_PARTIES'. The Owner_Table_Id of it will have the value of Party_Id from table HZ_PARTIES, which has Party_Type value equals to 'PARTY_RELATIONSHIP'.
    After this, my main goal is to create a role responsibility to the contact name. So I know there are other two tables involved. They are HZ_CUST_ACCOUNT_ROLES and HZ_ROLE_RESPONSIBILITY.
    And I see there are two more tables involved, which are HZ_RELATIONSHIPS, which will do the PERSON x ORGANIZATION relation, and also table HZ_ORG_CONTACTS, which has the field PARTY_SITE_ID, to finally indicate that this contact is part of a site, which I already have.
    I have all these tables in mind. I just need a tip on how to proceed. I'm able to create a party as PERSON, not yet as PARTY_RELATIONSHIP. I'm able to create a contact point (telephone number). I'm lacking the idea about what to do have this:
    site -> contact name -> telephone number of this contact name inside this site
    I can do this:
    site -> telephone number of this site
    Any help would be great.

    Thanks for the reply but i stil have the problem...............
    My Current machine.config has this to say in that particular section
    <connectionStrings>
    <add name="LocalSqlServer" connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true" providerName="System.Data.SqlClient"/>
    <add name="OraAspNetConString" providerName="Oracle.DataAccess.Client" connectionString=" "/>
    </connectionStrings>
    What can be done.........................in this case
    Thanks

  • Error in Oracle API  HZ_CUST_ACCOUNT_V2PUB.create_cust_account

    Error in Oracle API HZ_CUST_ACCOUNT_V2PUB.create_cust_account
    Column account_number must have a value.
    why?

    What is the apps version ?
    Have you gone through these notes:
    Using TCA API's Including Examples [ID 201243.1]
    How To Create A Customer Via TCA API [ID 159393.1]

  • Is it a bug in Oracle API ??

    We are implementing an interface between Oracle Mfg and a third party application to transfer BOMs etc. Here is the scenario I am looking to get some input on.... A simple BOM (2 components) was transferred to Oracle manufacturing using the interface which processes BOM data via oracle API and creates an EC in Engineering module. After this transaction was completed, Engineering module showed item sequence numbers of 10 and 20 assigned to 2 components of the BOM. This BOM was revised and one of its components was disabled (one that had item sequence number of 10)and this change was submitted using our interface. ECO in the engineering module showed that the component was disabled but item sequence number assigned to this component was 30 instead of its original number 10. If the same exercise is carried out directly in Oracle engineering module item sequence number for disabled item would show as 10. So Oracle behaviour is different based on whether item in the BOM structure was disabled using API vs directly in Oracle where it should be same in both cases. Could it be a bug ?? Any input on this would be greatly appreciated.

    Hi Sunil,
    This is a bug. There doesn't seem to be a workaround.
    Can you contact me via email or post your email?
    Thanks.

  • Calling oracle API having parameter as record type throughPL/SQL WebService

    Hi All,
    I dont know whether this is the right forum to put this query, but as i am using a pl/sql web service , putting the query on this forum.
    My requirement is to call oracle API which in turh creates a single Invoice(using Ar_Invoice_Api_Pub.create_single_invoice )
    But the issue is this API in turn has some of the input parameters as Record type and table type, my concern is how to pass this data(record type or table type) as parameter thorugh java code .. If i use Collection or Hashmap will it work , I dont think so , some intermediate conversion will require.
    Subsequently the other requirement is fetch this record/table type data and return it to the java code
    Please correct me if i am wrong and suggest a proper solution if anybody is aware off or tried such things before.
    Thanks in advance.
    Regards,
    Anant.

    Hi,I'm new comer of this world,
    I've a pl/sql like this:
    package MY_WS_API is
    type record_set is ref cursor;
    PROCEDURE Get_User_Info(p_user_id VARCHAR2,
    p_rep_id VARCHAR2,
    p_flag out number,
    p_msg out varchar2,
    p_recordset out record_set);
    end MY_WS_API;
    when I using jdeveloper trying to publish it as a webservice, in the step 4 of the wizzard poping me choose the program unit to expose, the PROCEDURE Get_User_Info is not available and told me "Ref cursor Type is not supported due to a jdbc limitation and Ref Cursor Types are only supported for use of return type".
    THE QUESTION is:
    1.the cursor I used is of return type,I'm not very understanding the "why not" message upon.
    2.in such case , need I trans the return cursor into Object[] if have to?
    3.any other limitation for generating WS from PL/SQL using jdeveloper?
    Thanks!

  • Can't us Oracle API on the simple JSP pages added to the portlet........

    Hi,
    I added a jsp page in the portlet which is not a standard page like the default show mode pages. I have added some code which actually access a resource inside the porltet.
    " img src="<%= UrlUtils.constructResourceURL (pReq, HttpPortletRendererUtil .absoluteLink(request, "icon.png")) %> "
    For that you have to add the following two imports in the code
    mport="oracle.portal.provider.v2.render.http.HttpPortletRendererUtil"
    import="oracle.portal.provider.v2.url.UrlUtils"
    This library is available with the JDeveloper and I dont get any error while compiling and even deploying the portlet war file on the applcation server. Strangely the same piece of code shows the image perfectly for the default show page of the portlet but it generates 500 Internal server error for the other simple jsp page I added, which suggests that the server is unable to find the function:
    500 Internal Server Error
    java.lang.NullPointerException
         at oracle.portal.provider.v2.url.UrlUtils.constructResourceURL(Unknown Source)
         at _htdocs._elogbooksubsystems._DAQ._jspService(_DAQ.java:54)
         [SRC:/htdocs/elogbooksubsystems/DAQ.jsp:15]
         at com.orionserver[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:350)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:509)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:413)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:824)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:330)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:830)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:285)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:126)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186)
         at java.lang.Thread.run(Thread.java:534)
    Can anybody help? Is this possible to use oracle api in the pages which are though added to the portlet but not the standard show modes pages?
    Thanking you in anticipation
    Regards,
    Omer Alvi
    Message was edited by:
    user574208
    Message was edited by:
    user574208

    Thanks Nrintala. I tried to work with multipage portlet example provided in the jpdk. In fact I created another portlet with two pages and copied the code of the two pages of the multipage portlet. (Off course I took care of the names and stuff). Later I modified the provider.xml by defining "next_page" parameter. When I viewed my portlet, first page appeared fine but when I click on the link which should show the second page, I got an error which says.
    Error:      Error occurred while rendering portlet - see provider log file for details.
    Do you think I have missed something? I am depoying my war file on the stand alone OC4J and some how I have not been able to find the application.log file in my application inside the application_deployments of the J2EE_HOME. I have pasted the provider.xml file and I would be grateful if you can help.
    <?xml version = '1.0' encoding = 'UTF-8'?>
    <?providerDefinition version="3.1"?>
    <provider class="oracle.portal.provider.v2.DefaultProviderDefinition">
    <session>false</session>
    <passAllUrlParams>true</passAllUrlParams>
    <portlet class="oracle.portal.provider.v2.DefaultPortletDefinition">
    <id>1</id>
    <name>mulitpage</name>
    <title>testing multi page</title>
    <description>My Portlet Description</description>
    <timeout>40</timeout>
    <showEditToPublic>false</showEditToPublic>
    <hasAbout>false</hasAbout>
    <showEdit>false</showEdit>
    <hasHelp>false</hasHelp>
    <showEditDefault>false</showEditDefault>
    <showDetails>false</showDetails>
    <renderer class="oracle.portal.provider.v2.render.RenderManager">
    <contentType>text/html</contentType>
    <showPage>/htdocs/mulitpage/first.jsp</showPage>
    <pageParameterName>next_page</pageParameterName>
    </renderer>
    </portlet>
    </provider>
    Best regards,
    Omer
    Message was edited by:
    user574208
    Message was edited by:
    user574208

  • Example of Asynchronous Web Service Using Oracle APIs

    Greetings,
    Is there any tutorial, section or example of Oracle, that explains clearly, how to create an Asynchronous Web Service using Oracle APIs.
    Thakns in advance for your help.-

    Does this help:
    http://niallcblogs.blogspot.com/2009/03/calling-async-bpel-process-from-jdev.html

  • Error in Creating the Oracle Fail Safe Group during installation on MSCS

    Hi All,
    I am installing ECC 6 dual stack on MSCS.
    I have done steps till CI installation as per installation guide.
    I am gettig the following error in the step "Creating the Oracle fail safe group" while changing physical hostname into the virtual databse hostname using configtool in secure store parameter jdbc/pool/<SAPSID>Url as per the installation guide.
    "Error occurred while working with configuration(scanning)
    MSG:Error while connecting to the database"
    I think it is not accepting the virtual hostname.
    In our scenario CI is running CI node and DB instance is running on DB node.
    I have followed the steps as per the installation guide.
    Please let me know how to resolve this issue.
    Database - Oracle 10g,OS is Windows server 2008 enterprse edition.
    Regards,
    Dinakar
    Edited by: mutnuru dinakar on Jun 1, 2011 1:39 PM
    Edited by: mutnuru dinakar on Jun 1, 2011 1:40 PM

    Hi,
    Thanks for your reply.
    1) did you stop the CI before making the modifications as stated in the installation guide?
         Yes
    2) is your database currently running on the same physical cluster node as your CI?
        No.Database instance is running on DB node and CI is on CI node.
    3) is your database online?
         Yes,it is up and running
    Please let me know if there is anyway to resolve this issue.
    Regards,
    Dinakar

  • Invoking a web service not created using oracle web service lib

    Hi All,
    I have a need to invoke my web service from oracle sql command. My web service not created using oracle web service library, but it is created using axis c++ libraries. Is it possible to do so,
    Thanks in advance,
    Regards,
    Monica

    In order to call out from the database process, is SQL (or PL/SQL) you need to generate some client code, that understand the details about the specific of the service you want to invoke and can produce the correct SOAP request. Once this proxy is uploaded in the Database, you can use it.
    There is a set of Database Web services samples that should help you get started. You can also take a look at the developer's guide - see Developing a Web Service Client in the Database.
    Hope it answers your question.
    --eric                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Problems While Creating A Oracle Instance In Windows 7

    Hi All,
    I am trying to create a primary standby configuration in windows 7. When I am trying to create a oracle instance using oradim I am facing the below issue:-
    I am using Oracle version 10.2.0.1.0.
    C:\>ORADIM -new -sid STDBY -SRVC OracleServiceSTDBY -STARTMODE auto -SRVCSTART s
    ystem -SPFILE;
    DIM-00003: An argument is missing for the parameter.
    I am not sure which parameter is missing. can you help me in this..
    Regards,
    Arijit

    Hi Abdul,
    I did the same thing mentioned by you but now I am facing some different error:-
    C:\>ORADIM -edit -sid STDBY -STARTMODE manual -SRVCSTART system -pfile E:\Arijit
    \oraclestby\dbs\initstdby.ora;
    DIM-00077: Failed to change service configuration.
    O/S-Error: (OS 5) Access is denied.
    When I tried the first step I am getting another error:-
    C:\>oradim -edit -sid STDBY -startmode auto -srvcstart system
    DIM-00077: Failed to change service configuration.
    O/S-Error: (OS 5) Access is denied.
    Please suggest.
    Regards,
    Arijit

  • How to Create an Oracle BAM Server Connection?

    I m following the steps at the end of this post to create the connection but at the end I m getting this message from JDev:
    {Unable to write to
    /C:/JDeveloper/mywork/Application1/.adf/META-INF/connections.xml
    because it is a read-only. Either make it writable or allow it to be made writable through source control.}
    it creates the directory C:/JDeveloper/mywork/Application1/.adf/META-INF/ with only a adf-config.xml file but NOT the connections.xml any one knows what is wrong?
    Bellow is the stpes I m following. Its exactly what is written at the Oracle Fusion Middleware Developer´s guide for Oracle SOA Suite 11g Release 1(11.1.1) E10224-01
    To create an Oracle BAM connection:
    1. Select New from the File main menu in Oracle JDeveloper.
    The New Gallery dialog opens.
    2. Choose Connections from the General category.
    3. Select BAM Connection in the Items list, and click OK.
    The BAM Connection wizard opens.
    4. Provide a name for the connection. Leave the Create Connection In selection as
    Application Resources.
    5. Click Next.
    6. Enter the following connection information about the Oracle BAM instance.
    7. Click Next.
    8. Test the connection by clicking Test Connection. If the connection was successful,
    the following message appears:
    Passed.
    9. Click Finish.
    Note: You can create connections to Oracle BAM in the Oracle
    JDeveloper Resource Palette as well as the Application Resources
    panel of a specific application. It is recommended that you create these
    connections in the Application Resources pane rather than the
    Resource Palette.
    Field Description
    BAM Web Host Enter the name of the host on which the BAM report server and
    Web server are installed. In most cases, the BAM Web host and
    Oracle BAM Server host are the same.
    BAM Server Host Enter the name of the host on which the Oracle BAM Server is
    installed.
    User Name Enter the Oracle BAM Server user name (typically bamadmin).
    Password Enter the password of the user name.
    HTTP Port Enter the port number or accept the default value of 8888. This is
    the HTTP port for the BAM Web host.
    RMI Port Enter the port number or accept the default value of 9085. The
    RMI port is for the BAM report cache, which is part of the Oracle
    BAM Server.
    Use HTTPS Select this check box if you want to use secure HTTP (HTTPS) to
    connect to the Oracle BAM Server during design time.
    Otherwise, HTTP is used.
    Message was edited by:
    Mario.Mesquita

    Ok that will be nice, but is not the case I dont want to read the tutorial, the problem is I already start to read and execute the tutorial you told me the problem is this tutorial it doesnt show how to do everything from scratch because you already have inside the zip file everything like xmls etc etc, and I want to get my DO and create the process myself, I dont want to get something that it is already done, this tutorial does not show for example how to create this composite.xml, this file it is already inside the zip file, so this way I just follow half of the process and dont learn how to make the whole process.
    tks

  • PDF file created from Oracle Report is attached wrongly

    Hi,
    Please help. It is very urgent.
    I am using Oracle Developer 10gR2, Oracle Report 10.1.2 on Windows 2000.
    I would like to attach the PDF file created by Oracle Report to the Notification sent from Workflow.
    I use the following package procedure in my Workflow.
    procedure Create_File_Attachment (document_id   in varchar2, display_type  in varchar2, document      in out blob, document_type in out varchar2)
    is
         l_itemtype          varchar2(100);
         l_itemkey           varchar2(100);
         l_output_directory  varchar2(30);
         l_filename          varchar2(255);
         src_loc             bfile;
         bdoc                blob;
         src_offset          number := 1;
         dst_offset          number := 1;
         amount              number;
    begin
         l_itemtype := substr(document_id, 1, instr(document_id, ':') - 1);
         l_itemkey := substr(document_id, instr(document_id, ':') + 1, length(document_id) - 2);
         l_output_directory := 'USR_TMP_DIR';
         l_filename := Wf_Engine.GetItemAttrText(l_itemtype, l_itemkey, 'ATR_FILENAME');
         src_loc := bfilename(l_output_directory,l_filename);
         dbms_lob.createTemporary(bdoc, FALSE, dbms_lob.call);
         dbms_lob.fileopen(src_loc, dbms_lob.file_readonly);
         dbms_lob.loadblobfromfile(bdoc,src_loc,dbms_lob.lobmaxsize,src_offset,dst_offset);
         dbms_lob.fileclose(src_loc);
         amount := dbms_lob.getLength(bdoc);
         dbms_lob.copy(document,bdoc,amount,1,1);
         document_type := 'application/pdf; name=attach.pdf';
    end Create_File_Attachment;Oracle Report created the PDF file correctly (original.pdf).
    I tried to attach the PDF into my Workflow.
    I can see the file is attached (attach.pdf), but it cannot be opened.
    The Adobe shows : 'A drawing error occured.' each time I open the attachment.
    I compare the original.pdf and the attach.pdf
    However, there is one specific difference
    - in original.pdf, the line started with '.' (single period)
    in attach.pdf, the line is started with '..' (two periods)
    Thus the attachment cannot be opened.
    After I delete the period, it can be opened.
    Question:
    - Has someone ever succeed in attaching the PDF created from Report?
    - Are the codes above is wrong?
    - Or perhaps the DBMS_LOB.LOADBLOBFROMFILE always double the single period on front of the line?
    - Is there any solution on this?
    Note:
    I have succeed in attaching PDF files unless the PDF created by the Report.
    Sorry for the long post.
    Please help. It is very urgent.
    Any help is appreciated.
    Many thanks,
    Buntoro

    The code looks absolutely good. I have the same code working in my system. Only difference is I use TRUE and DBMS_LOB.Session for the BLOB I use to read from the BFILE.
    I can suggest one more way to handle to binary attachments if you are on Oracle 9i DB are later versions.
    procedure attach_document (p_document_id   in varchar2,
                               p_display_type  in varchar2,
                               p_document      in out nocopy clob,
                               p_document_type in out nocopy varchar2)
    is
      l_nid        number;
      l_directory  varchar2(100);
      l_filename   varchar2(100);
      l_content_type varchar2(100);
      l_src_offset binary_integer := 1;
      l_dst_offset binary_integer := 1;
      l_err_msg    varchar2(100);
      l_amount     number;
      l_bfile BFILE;
      l_blob  BLOB;
      l_clob  CLOB;
      file_not_found exception;
      pragma EXCEPTION_INIT(file_not_found, -22288);
    begin
      l_nid := to_number(p_document_id);
      l_directory := trim(wf_notification.GetAttrText(l_nid, 'ATTR_DIRECTORY'));
      l_filename := trim(wf_notification.GetAttrText(l_nid, 'ATTR_FILENAME'));
      l_content_type := trim(wf_notification.GetAttrText(l_nid, 'ATTR_CONTENT_TYPE'));
      l_bfile := BFILENAME(l_directory, l_filename);
      dbms_lob.createtemporary(l_blob, true, dbms_lob.Session);
      dbms_lob.createtemporary(l_clob, true, dbms_lob.Session);
      begin
        dbms_lob.FileOpen(l_bfile, dbms_lob.File_Readonly);
      exception
        when file_not_found then
          l_err_msg := to_char(sqlcode)||' - Attachment File "'||l_filename||'" is not found.';
          raise_application_error(-20002, l_err_msg);
      end;
      dbms_lob.LoadBLOBFromFile(l_blob, l_bfile, dbms_lob.LobMaxSize, l_src_offset, l_dst_offset);
      dbms_lob.FileClose(l_bfile);
      -- Encode the BLOB content to BASE64 and attach to notification  
      wf_mail_util.EncodeBLOB(l_blob, l_clob);
      l_amount := dbms_lob.GetLength(l_clob);
      dbms_lob.Copy(p_document, l_clob, l_amount, 1, 1);
      -- Mention an appropriate Content Type so that Notification System
      -- understands the attachment content
      p_document_type := l_content_type||'; encoding=base64; name='||l_filename;
    end attach_document;Here I read the BLOB from the filesystem and base64 encode it before giving it to the Mailer. Please note that this is a PLSQLCLOB based attachment as against PLSQLBLOB that you are using.
    Thanks - Vijay

  • PDF file created from Oracle Report is created wrongly using dbms_lob

    Hi,
    Please help. It is very urgent.
    I am using Oracle Developer 10gR2, Oracle Report 10.1.2 on Windows 2000.
    I would like to attach the PDF file created by Oracle Report to the Notification sent from Workflow.
    I use the following package procedure in my Workflow.
    procedure Create_File_Attachment (document_id   in varchar2, display_type  in varchar2,
                                                                                         document      in out blob, document_type in out varchar2)
    is
         l_itemtype          varchar2(100);
         l_itemkey           varchar2(100);
         l_output_directory  varchar2(30);
         l_filename          varchar2(255);
         src_loc             bfile;
         bdoc                blob;
         src_offset          number := 1;
         dst_offset          number := 1;
         amount              number;
    begin
         l_itemtype := substr(document_id, 1, instr(document_id, ':') - 1);
         l_itemkey := substr(document_id, instr(document_id, ':') + 1, length(document_id) - 2);
         l_output_directory := 'USR_TMP_DIR';
         l_filename := Wf_Engine.GetItemAttrText(l_itemtype, l_itemkey, 'ATR_FILENAME');
         src_loc := bfilename(l_output_directory,l_filename);
         dbms_lob.createTemporary(bdoc, FALSE, dbms_lob.call);
         dbms_lob.fileopen(src_loc, dbms_lob.file_readonly);
         dbms_lob.loadblobfromfile(bdoc,src_loc,dbms_lob.lobmaxsize,src_offset,dst_offset);
         dbms_lob.fileclose(src_loc);
         amount := dbms_lob.getLength(bdoc);
         dbms_lob.copy(document,bdoc,amount,1,1);
         document_type := 'application/pdf; name=attach.pdf';
    end Create_File_Attachment;Oracle Report created the PDF file correctly (original.pdf).
    I tried to attach the PDF into my Workflow.
    I can see the file is attached (attach.pdf), but it cannot be opened.
    The Adobe shows : 'A drawing error occured.' each time I open the attachment.
    I compare the original.pdf and the attach.pdf
    However, there is one specific difference
    - in original.pdf, the line started with '.' (single period)
    in attach.pdf, the line is started with '..' (two periods)
    Thus the attachment cannot be opened.
    After I delete the period, it can be opened.
    Question:
    - Has someone ever succeed in attaching the PDF created from Report?
    - Are the codes above is wrong?
    - Or perhaps the DBMS_LOB.LOADBLOBFROMFILE always double the single period on front of the line?
    - Is there any solution on this?
    Note:
    I have succeed in attaching PDF files unless the PDF created by the Report.
    Sorry for the long post.
    Please help. It is very urgent.
    Any help is appreciated.
    Many thanks,
    Buntoro

    Hi,
    Please help. It is very urgent.
    I am using Oracle Developer 10gR2, Oracle Report 10.1.2 on Windows 2000.
    I would like to attach the PDF file created by Oracle Report to the Notification sent from Workflow.
    I use the following package procedure in my Workflow.
    procedure Create_File_Attachment (document_id   in varchar2, display_type  in varchar2,
                                                                                         document      in out blob, document_type in out varchar2)
    is
         l_itemtype          varchar2(100);
         l_itemkey           varchar2(100);
         l_output_directory  varchar2(30);
         l_filename          varchar2(255);
         src_loc             bfile;
         bdoc                blob;
         src_offset          number := 1;
         dst_offset          number := 1;
         amount              number;
    begin
         l_itemtype := substr(document_id, 1, instr(document_id, ':') - 1);
         l_itemkey := substr(document_id, instr(document_id, ':') + 1, length(document_id) - 2);
         l_output_directory := 'USR_TMP_DIR';
         l_filename := Wf_Engine.GetItemAttrText(l_itemtype, l_itemkey, 'ATR_FILENAME');
         src_loc := bfilename(l_output_directory,l_filename);
         dbms_lob.createTemporary(bdoc, FALSE, dbms_lob.call);
         dbms_lob.fileopen(src_loc, dbms_lob.file_readonly);
         dbms_lob.loadblobfromfile(bdoc,src_loc,dbms_lob.lobmaxsize,src_offset,dst_offset);
         dbms_lob.fileclose(src_loc);
         amount := dbms_lob.getLength(bdoc);
         dbms_lob.copy(document,bdoc,amount,1,1);
         document_type := 'application/pdf; name=attach.pdf';
    end Create_File_Attachment;Oracle Report created the PDF file correctly (original.pdf).
    I tried to attach the PDF into my Workflow.
    I can see the file is attached (attach.pdf), but it cannot be opened.
    The Adobe shows : 'A drawing error occured.' each time I open the attachment.
    I compare the original.pdf and the attach.pdf
    However, there is one specific difference
    - in original.pdf, the line started with '.' (single period)
    in attach.pdf, the line is started with '..' (two periods)
    Thus the attachment cannot be opened.
    After I delete the period, it can be opened.
    Question:
    - Has someone ever succeed in attaching the PDF created from Report?
    - Are the codes above is wrong?
    - Or perhaps the DBMS_LOB.LOADBLOBFROMFILE always double the single period on front of the line?
    - Is there any solution on this?
    Note:
    I have succeed in attaching PDF files unless the PDF created by the Report.
    Sorry for the long post.
    Please help. It is very urgent.
    Any help is appreciated.
    Many thanks,
    Buntoro

  • Field selection problem in a form created in Oracle forms 9i

    I am using an application created in Oracle 9 i Forms. Mouse navigation in the forms do not work properly. Since a field is selected and some string is typed then first character is allways ignored hence it is necessary to press a key like before typing required string. The same application works well when I'm using Oracle JInitiator.

    Hi, again and thanks for the patience. I am using the oracle plugin all the time and it works. But I need to use the application on different computer where the oracle JInitiator could not be installed. There I am trying to use the Sun Java Plugin Version 1.4.2_06 (build 1.4.2_06-b03) which shall be compatible. Since last time I asked again the provider and I found that the application is pure Oracle Forms 9i application which doesn't need Java when it is run on the computer where the application is instaled. The Java plugin is then used to show the forms and to provide the comunication between clients and application server. Probably it is clear to you however I am not a developer but poor user only. I have also tried to play with the application to find how it works (or doesn't works). It seems that the problem is exactly with mouse navigation. When tab or enter is used then it works fine. But when a form field is selected by mouse then a character is typed and i can see it. But when I continue with the writing the first character is overwrite. Sometimes when there is a list of records row by row and I try to get to next row using the mouse the application tells me that some bloody key is not valid but using the key down I can easily go ti next row. To tell the truth I don't like mouses at all so it is no problem to me but other users do not know how Tab works :-)

  • Help with Creating a Oracle Data Source

    Hello:
    I am trying to create a Oracle Data source.
    I was successful in creating a JDBC Conection Pool.
    But I am stumped creating a new datasource that uses the Oracle Connection Pool.
    It asks for a JNDI Name and I have no clue what I should enter in this box.
    Can somebody help me?
    Thanks.
    venki

    Enter whatever name suits you. This is the name you will use when looking up your datasource in the JNDI tree, i.e.
    Context ctx = new InitialContext();
    DataSource oracleDS = (DataSource) ctx.lookup("myJNDIName");

Maybe you are looking for