Writing from PL/SQL procedure to the DBF files

Hi, Almighty Oracle,
I use Oracle 8.1.7 EE on Red Hat 7.3 and have
to write some tables to DBF file. I've decided
to use Heterogeneous Services but I have not
the ODBC driver for DBF files. What I must to do?
Maybe, there is another ways to decide this task?

Hello,
Yeah , I got the solution using DBMS_PIPE function,I
followed following steps.
1. Pipe is created. see below procedure.
create or replace procedure proc_testpipe as
     v_pipe_integer          integer;
     v_pipe_message          integer;
begin
     v_pipe_integer := DBMS_PIPE.Create_Pipe('adipipe');
     dbms_pipe.pack_message('Hello Adinath Kamode,Message
     from Pipe');
     v_pipe_message := dbms_Pipe.Send_message('adipipe');
     end;
end;
2. then I created one Function which will obtain message from
Pipe and
will return value to form.
create or replace function proc_callpipe return varchar2 as
v_msg          integer;
v_rem          integer;
v_message          varchar2(500);
begin
v_msg:=dbms_pipe.receive_message('adipipe');
dbms_pipe.unpack_message(v_message);
dbms_pipe.purge('adipipe');
v_rem := dbms_pipe.remove_pipe('adipipe');
return(v_message);
end;
3. Last I called this function from form.
Cheers .. !
Adi

Similar Messages

  • Run report from PL/sql procedure

    Please any one tell how to I run a report from pl/sql procedure.

    I am not sure, but depending on your environment you can create a script to run your PL/SQL code and then generate the report. As is customary in an UNIX environment utilizing shell scripts.

  • XML Data from PL/SQL procedure -- special character issue (eBS)

    Hi All,
    I am developing a report, where the XML data is created by a PL/SQL procedure. I chose this approach over a data template, since there is a lot of processing involved in producing the actual data, and it cannot be done by select-statements alone. The report is run as a regular concurrent request.
    So far so good. There is a problem though. Every time the data contains special characters (ä, ö, umlauts), the concurrent request is completed with a warning, the log confirms that "One or more post-processing actions failed.", also there is no output file. The XML structure is valid as such. The report runs smoothly and produces the output when the XML data does not contain special characters.
    I am producing the XML lines by using the standard FND_FILE.PUT_LINE procedure: Fnd_File.put_line(Fnd_File.output, '<?xml version="1.0" encoding="UTF-8"?>'); This seems like a character encoding issue, but declaring the UTF-8 encoding in this way does not solve the problem.
    Any ideas what can be done to fix this? I have been searching Metalink but cannot find an answer. Many thanks for your kind help.
    Best Regards, Matilda

    Hi Rajesh,
    One idea I have, is that it might be possible to modify the PL/SQL code into a "before report" type trigger, attached to a data template. The code would process the data and write the lines into a temporary table, from which the data template could retrieve them in a simple select-query. However, it would be neat to be able to solve this without adding an extra layer of processing, since BI Publisher supposedly supports PL/SQL procedures as the data source.
    The data in this case is all correct, special characters are an intrinsic feature of the Finnish language. :)
    Best Regards, Matilda

  • Creating web service from pl/sql procedure

    Hello.
    I need to create a web service from pl/sql procedure and i chose JDeveloper for this implementation. I have wsdl, but I never created web services. So, I created web service with document/literal message format.
    But I have several troubles:
    1. All element names have lower case letters.
    2. The SOAP envelope must begin from words soapenv:Envelope but i have soap:Envelope.
    3. And operation name has tail like "Element".
    I know bad way for implement 1 and 3 points. It's a modification of java_wsdl_mapping.xml and wsdl files. But if I want to add new method to my service all changes will be cleaned. It's not critical but inconvenient to support.
    But for point 3 i have no ideas.
    This task is very important for me. Can somebody help me?
    JDeveloper 10.1.3.3
    Regards,
    Aleksey

    http://www.oracle.com/technology/obe/obe1013jdev/10131/wsfromplsqlpackage/devwsfrom%20plsql.htm
    Frank

  • How to call javascript function from PL/SQL procedure

    Can anybody advice me how to call javascript function from PL/SQL procedure in APEX?

    Hi,
    I have a requirement to call Javascript function inside a After Submit Process.
    clear requirement below:
    1. User selects set of check boxes [ say user want to save 10 files and ticks 10 checkboxes]
    2. user clicks on "save files" button
    3. Inside a After submit process, in a loop, i want to call a javascript function for each of the file user want to save with the filename as a parameter.
    Hope this clarify U.
    Krishna.

  • Unix shell script run from pl/sql procedure

    Hi Guru
    I want to run unix shell script from pl/sql procedure. Actual I want to run it from developer 10g form.
    Please guide me in this regards
    Regards
    Jewel

    Look at the host or client_host builtins in the help

  • PL/SQL Procedures with the same name

    Hi,
    I have some PL/SQL procedures with the same name but different arguments.
    If I try to catalog the second or third ALBPM always catalogs the first and I don't want to use this. ALBPM only catalogs the first one.
    ALBPM Studio Logs:
    Introspecci?n en curso...
    Agregando procedimiento 'ADM_SGI.UGDIASINOI'
    Agregando procedimiento 'ADM_SGI.UGDIASINOI'
    Agregando procedimiento 'ADM_SGI.UGDIASINOI'
    [Advertencia] No se puede agregar procedimiento 'UGDIASINOI'. Motivo: Duplicar nombre del componente (M?dulo DatabaseRoot.ADM_SGI - Componente UGDIASINOI)..
    [Advertencia] No se puede agregar procedimiento 'UGDIASINOI'. Motivo: Duplicar nombre del componente (M?dulo DatabaseRoot.ADM_SGI - Componente UGDIASINOI)..
    Analizando componentes
    Any solution or idea??
    Thanks!

    I need to retrive data from PL/SQL stored procedures. I am using the DynamicSQL component (2nd workaround) to retrive data from PL/SQL stored procedures. <br><br>
    I am having some problems.<br><br>
    This is the code I am running in Fuego Studio 5.5 SP 11 Build #71108:<br><br>
    dynamicSQL as Fuego.Sql.DynamicSQL<br>
    iterator as Iterator(Any[Any])<br>
    sentence as String<br>
    implname as String<br><br>
    dynamicSQL = Fuego.Sql.DynamicSQL()<br>
    implname = "conexionORBPAU"<br>
    sentence = "var result REFCURSOR; " + <br>
    "exec :result_cursor := pkg_audbpm_bpaasig_indicador.prgetsingle(9999);";<br>
    iterator = executeQuery(DynamicSQL, sentence, implname, inParameters : []);<br><br>
    And, this is the error:<br><br>
    java.sql.SQLException: Falta el parametro IN o OUT en el indice:: 1 <br>
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)<br>      at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:146)<br>
    oracle.jdbc.driver.OraclePreparedStatement.processCompletedBindRow(OraclePreparedStatement.java:1681)<br>
         at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3280)<br>
         at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3329)<br>
         at fuego.jdbc.FaultTolerantPreparedStatement.executeQuery(FaultTolerantPreparedStatement.java:579)<br>
         at fuegoblock.sql.DynamicSQL.executeQuery(DynamicSQL.java:340)<br>
    ...<br><br>
    This is the code of the PL/SQL in the Oracle DB:<br><br>
    CREATE OR REPLACE PACKAGE PKG_AUDBPM_BPAASIG_INDICADOR IS<br>
    TYPE cursor_type IS REF CURSOR;<br>
         FUNCTION prGetSingle<br>
         (<br>
              p_ID_ASIG_INDICADOR IN NUMBER<br>
         )<br>
         RETURN cursor_type;<br><br>
    END PKG_AUDBPM_BPAASIG_INDICADOR;<br><br>
    is my code OK? Any ideas?<br><br>
    Thanks in advance.<br>

  • How to raise Workflow error from pl/sql procedure

    Hi,
    I have this OWB mapping that runs a PL/SQL procedure. The mapping is deployed to Workflow and OEM. The workflow is scheduled and run from OEM,
    and I can watch its progress/completion in the Workflow Monitor. Occasionally, the PL/SQL hits a situation I want to flag as an error to OWF so
    that the OWF standard error process can be activated.
    How can I do that? I try to raise an exception from the proc by calling OWF's core API (WF_CORE.RAISE etc.), but nothing happens.
    From Workflow monitor no errors are detected, and the workflow seems to complete normally.
    Any clues?
    Regards
    Rolf

    Rolf,
    I am no workflow expert but it seems to me that you trying to build a workflow exception handler by using the engine APIs (WF_ENGINE). In particular, you could call the WF_ENGINE.ABORT_PROCESS API and set the status to exception. This can be called from an exception handler using the WF_ENGINE.HandleError API.
    As far as I know, the WF_CORE API mentioned by you will simply return an exception to the caller, but this will not affect the process flow.
    For more details, please take a look at the workflow documentation, in particular if you log into the metalink site (metalink.oracle.com), go to the document http://metalink.oracle.com/cgi-bin/cr/getfile_cr.cgi?282250 which is the user's guide and look under chapter 8 which deals with APIs.
    Regards:
    Igor

  • Sending message from PL/SQL procedure to form

    Hello Friends,
    How can I send messages from PL/SQL procedure to Form ?
    Ultimate target is catching progress of PL/SQL procedure from
    form. I heard about DBMS_PIPe but not sure,.
    Adi

    Hello,
    Yeah , I got the solution using DBMS_PIPE function,I
    followed following steps.
    1. Pipe is created. see below procedure.
    create or replace procedure proc_testpipe as
         v_pipe_integer          integer;
         v_pipe_message          integer;
    begin
         v_pipe_integer := DBMS_PIPE.Create_Pipe('adipipe');
         dbms_pipe.pack_message('Hello Adinath Kamode,Message
         from Pipe');
         v_pipe_message := dbms_Pipe.Send_message('adipipe');
         end;
    end;
    2. then I created one Function which will obtain message from
    Pipe and
    will return value to form.
    create or replace function proc_callpipe return varchar2 as
    v_msg          integer;
    v_rem          integer;
    v_message          varchar2(500);
    begin
    v_msg:=dbms_pipe.receive_message('adipipe');
    dbms_pipe.unpack_message(v_message);
    dbms_pipe.purge('adipipe');
    v_rem := dbms_pipe.remove_pipe('adipipe');
    return(v_message);
    end;
    3. Last I called this function from form.
    Cheers .. !
    Adi

  • Returing array from PL/SQL procedure

    Hi,
    I am trying to return array from PL/SQL procedure. Heres is the code. I am getting an error "OracleParameter.ArrayBindSize is invalid ".
    Will anybody let me know what is wrong in following code. or does anybody have code to return PL/SQL array using VB.NET.
    oCommand.CommandText = "MyPack.TestVarchar2"
    oCommand.CommandType = CommandType.StoredProcedure
    Dim id As Integer = 10
    Dim deptname As String()
    Dim oParam1 As Oracle.DataAccess.Client.OracleParameter = New Oracle.DataAccess.Client.OracleParameter("id", Oracle.DataAccess.Client.OracleDbType.Int32)
    Dim oParam2 As Oracle.DataAccess.Client.OracleParameter = New Oracle.DataAccess.Client.OracleParameter("deptname", Oracle.DataAccess.Client.OracleDbType.Varchar2)
    oParam1.Direction = ParameterDirection.Input
    oParam2.Direction = ParameterDirection.Output
    oParam1.CollectionType = Oracle.DataAccess.Client.OracleCollectionType.None
    oParam2.CollectionType = Oracle.DataAccess.Client.OracleCollectionType.PLSQLAssociativeArray
    oParam1.Value = id
    oParam2.Value = ""
    oParam1.Size = 10
    oParam2.Size = 20
    oCommand.Parameters.Add(oParam1)
    oCommand.Parameters.Add(oParam2)
    oCommand.ExecuteNonQuery()
    Thanks
    Sameer

    Thanks Arnold for the reply..
    Yes, I am trying to get result set in array which is unknow to me (No of rows return by the query). For the test I will pre-define the result set so that I will able to set ArrayBindSize.
    I have read C# example but when I try to write it in VB.NET it gives me syntax error when I try to set the ArrayBindSize.
    oParam.ArrayBindSize = new int[3]{15,23,13} // individual max size of 3 outputsWill you please let me know how to set ArrayBindSize (VB.NET) because I am new to this..
    There is an example at otn "How to: Bind an Array to an ODP.NET Database Command" which does multiple INSERTs in one trip to database. This works fine. I need to do same for the SELECT statement which will return me multiple rows. I do not mean refCursor. If I use refCursor, it will make soft parse which I am trying to avoid using this Array techniq.
    Thanks
    Sameer

  • Creating Excel Workbook from PL/SQL Procedure

    I am trying to create Excel Workbook with two worksheets from PL/SQL procedure. I created one worksheet. Can I create a separate sheet from same procedure. I used OWA_UTIL.MIME_HEADER ('application/vnd.ms-excel', FALSE)
    command to create the spreadsheet.
    Any help would be helpful.
    Thanks
    Yagna Shah

    Further to my previous post here is how I will develop a typical master details excel report.
    by using the package,
    It will also show sum of salary at each department.
    Note : When I paste the code here I loose the indentation. So the code below is not indented properly.
    DECLARE
    r NUMBER := 0 ; --- r IS the ROW NUMBER IN this excel file
    l_sum NUMBER ;
    BEGIN
    --- Generate the styles that we need
    gen_xl_xml.create_excel( 'UTL_DIR','master_Detail.xls') ;
    gen_xl_xml.create_style( 'dept_title' , 'Arial', 'Red',14, p_backcolor => 'LightGray' );
    gen_xl_xml.create_style( 'sgs2' , 'Arial', NULL ,10, p_bold => TRUE );
    gen_xl_xml.create_style( 'sgs3' , 'Arial', 'blue',14 );
    gen_xl_xml.create_style( 'sgs4' , 'Arial', 'green',14 );
    gen_xl_xml.create_style( 'emp_title' , 'Arial', 'Black',9, p_backcolor => 'LightBlue' );
    gen_xl_xml.create_style( 'sal_tot' , 'Arial', 'Brown',13, p_backcolor => 'Yellow' );
    -- SET ANY COLUMN AND ROW changes
    gen_xl_xml.set_column_width( 3, 145 );
    gen_xl_xml.set_column_width( 4, 145 );
    l_sum := 0 ;
    FOR recd IN ( SELECT department_id, department_name FROM departments ) LOOP
    IF l_sum <> 0 THEN
    r := r +1 ;
    gen_xl_xml.write_cell_char( r, 4, 'Department Total ->' , 'sal_tot' );
    gen_xl_xml.write_cell_num( r, 5, l_sum , 'sal_tot' );
    l_sum := 0;
    END if ;
    r := r+1 ;
    gen_xl_xml.write_cell_CHAR( r,1, 'Department : '|| recd.department_name , 'dept_title' );
    -- As we need same style applied till the above data flows use write_cell_null
    gen_xl_xml.write_cell_NULL( r,2 , null );
    gen_xl_xml.write_cell_NULL( r,3, 'dept_title' );
    gen_xl_xml.write_cell_NULL( r,4, 'dept_title' );
    gen_xl_xml.write_cell_NULL( r,5, 'dept_title' );
    --- Add employee heading
    r := r+1 ;
    gen_xl_xml.write_cell_CHAR( r,2, 'EmployeeID' , 'emp_title' );
    gen_xl_xml.write_cell_CHAR( r,3, 'First Name' , 'emp_title' );
    gen_xl_xml.write_cell_CHAR( r,4, 'Last Name' , 'emp_title' );
    gen_xl_xml.write_cell_CHAR( r,5, 'Salary' , 'emp_title' );
    FOR rec IN (SELECT employee_id , first_name , last_name, salary FROM employees WHERE department_id = recd.department_id ) LOOP
    r := r+1 ;
    gen_xl_xml.write_cell_num( r,2, rec.employee_id, 'sgs2' );
    gen_xl_xml.write_cell_char( r,3, rec.first_name, 'sgs3' );
    gen_xl_xml.write_cell_char( r,4, rec.last_name , 'sgs4' );
    gen_xl_xml.write_cell_num( r,5, rec.salary );
    l_sum := l_sum + rec.salary ;
    END LOOP ;
    END LOOP ;
    gen_xl_xml.close_file ;
    END ;
    -----------------------------------------------------------------------------------------------------------------

  • Sending OS command from PL/SQL procedure

    "How can I send a operating system comand from PL/SQL procedure?
    I want to move , to copy , delete a file from a PL/sql procedure. i.e under unix send mv, cp or
    rm command";
    my e-mail is [email protected]

    take a look at
    http://asktom.oracle.com/pls/ask/f?p=4950:8:881946
    regards
    Freek D'Hooge
    "How can I send a operating system comand from PL/SQL procedure?
    I want to move , to copy , delete a file from a PL/sql procedure. i.e under unix send mv, cp or
    rm command";
    my e-mail is [email protected]

  • Oracle Forms can read the DBF files ?

    hi,
    i have 2 PC : the first with sco-unix and a database d-base with files .DBF
    and the second PC with windows xp pro and data base oracle
    i want to know if Oracle Forms can read the DBF files from the first PC and load the data to oracle data base.
    thank's

    Lido,
    If you can create an ODBC connector for your d-Base files you should be able to use ODBC to read the data from these files. The alternative would be to use TEXT_IO (Forms 6i/Client Server) or CLIENT_TEXT_IO (WebUtils) to read the .DBF files (as I recall, d-Base simply wrote a comma delimited data file). Using this method will require you to understand the layout of the .dbf file so you know which data element is which.
    Which method you use depends on which version of Oracle Forms you are using and if your application is web deployed or Client/Server.
    Craig...

  • Create the dbf file with java, but cannot display the data with VF

    Dear all,
    i create a dbf file with some java packages, this file can be opened and display all of the data with excel, but just can show the data structure and no any data when i open it with VF, how to solve it?

    Hi, I have got same problem as you. My application generates a DBF file from a resultset. In MS Excel it looks pretty good - all data, but when I try to open same DBF file with Fox or MS Access, I always see ONLY header(column names), but NO data! I don't know why?! The application generates this file using JDBF classes (version 1.0). I guess, maybe it is caused by the size of this file. The DBF file had 18 columns and over 32000 rows.
    Did you find the cause? I'll be grateful for help.

  • I want to initialize my MBpro end reinstall lino, but I purchased it from apple store and cancelled the installation file. If i try to download again it from appstore I couldn't...How I can do ? Please help me

    I want to initialize my MBpro end reinstall lino, but I purchased it from apple store and cancelled the installation file. If i try to download again it from appstore I couldn't...How I can do ? Please help me

    Thanks for the feedback. Now, before installing in, put a copy some place safe and you won't have to download it again, wasting bandwidth, time, and electricity. Why? Because the installer blows itself away during the installation—IMO, a braindead delivery system, copied from their iOS world, but totally unsuitable for computers.

Maybe you are looking for

  • Wire to connect to my TV

    Hello , what kind of cable do i need if i want to connect my macbook to my TV my TV have a HDMI but what do i need for the macbook thanks

  • How to estimate two products price  in split Valuation

    hello, everyone,   Our factory have Two equipments , one is a new equipment A , the other is an old equipment B,   they all produce the prodcut W , but the old equipment B consume electricity ,warm water and Raw material is much more than the new equ

  • Register Java Function

    Needed to register custom-defined function in Java on Essbase server. I am following the instructions on <BR><a target=_blank class=ftalternatingbarlinklarge href="http://dev.hyperion.com/download/code_library/exportcdf_readme2.cfm">Custome-defined f

  • Regarding mail

    how to send the pdf file as an attachment to some other mail...... give me sufficient examples........ fine solution reward with maximum points.........

  • What is wrong with app store iOS 6?

    What is wrong with iOS 6 on my iPod. Apps are loading and search results are empty.