How to call 'C' programs from stored procedures?

Hi
Did anybody tried to call 'C' programs
from oracle stored procedures?
If anybody knows, can you please send
how to configure the listener.ora and
tnsnames.ora. If its possible post all the
information from the begining with examples.
thanks....

Oracle JDBC did not support return a result set, if you are using Oracle 9i, you can use pipeline function, then using the TABLE() function the get the row.
Good Luck.
Welcome to http://www.anysql.net/en/

Similar Messages

  • How to call a sql server stored procedure from oracle

    Hi all,
    Please anybody tell me how to call a sql server stored procedure from oracle.
    I've made an hsodbc connection and i can do insert, update, fetch data in sql server from oracle. But calling SP gives error. when I tried an SP at oracle that has line like
    "dbo"."CreateReceipt"@hsa
    where CreateReceipt is the SP of sql server and hsa is the DSN, it gives the error that "dbo"."CreateReceipt" should be declared.
    my database version is 10g
    Please help me how can i call it... I need to pass some parameters too to the SP
    thanking you

    hi,
    thank you for the response.
    when i call the sp using DBMS_HS_PASSTHROUGH, without parameters it works successfully, but with parameters it gives the following error
    ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
    [Generic Connectivity Using ODBC][Microsoft][ODBC SQL Server Driver]Invalid parameter number[Microsoft][ODBC SQL Server Driver]Invalid Descriptor Index (SQL State: S1093; SQL Code: 0)
    my code is,
    declare
    c INTEGER;
    nr INTEGER;
    begin
    c := DBMS_HS_PASSTHROUGH.OPEN_CURSOR@hsa;
    DBMS_HS_PASSTHROUGH.PARSE@hsa(c, 'Create_Receipt(?,?)');
    DBMS_HS_PASSTHROUGH.BIND_VARIABLE@hsa(c,1,'abc');
    DBMS_HS_PASSTHROUGH.BIND_VARIABLE@hsa(c,2,'xyz');
    nr:=DBMS_HS_PASSTHROUGH.EXECUTE_NON_QUERY@hsa(c);
    DBMS_HS_PASSTHROUGH.CLOSE_CURSOR@hsa(c);
    end;
    Create_Receipt is the sp which requires two parameters.
    please give me a solution
    thanking you
    sreejith

  • How to call  java program from ABAP

    Hi Experts,
         My requirement is to call java programs from ABAP. For that i have set up SAP JCO connection by using this link http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/739. [original link is broken] [original link is broken] [original link is broken] Connection gets sucessfully. After this how to call java program from ABAP as per our requirement. Please help me out.
      Also i tried this way also.. but while executing the DOS Command line appear & disappear in few seconds. So couldnt see the JAVA output. Please help me out to call java programs in ABAP..
    DATA:command TYPE string VALUE 'D:Javajdk1.6.0_20 injavac',
    parameter TYPE string VALUE 'D:java MyFirstProgram'.
    CALL METHOD cl_gui_frontend_services=>execute
    EXPORTING
    application = command
    parameter = parameter
    OPERATION = 'OPEN'
    EXCEPTIONS
    cntl_error = 1
    error_no_gui = 2
    bad_parameter = 3
    file_not_found = 4
    path_not_found = 5
    file_extension_unknown = 6
    error_execute_failed = 7
    OTHERS = 8.
    Thanks.

    This depends on the version of your Netweaver Java AS. If you are running 7.0, you will have to use the Jco framework. The Jco framework is deprecated since 7.1 though. If you want to build a RFC server in 7.1 or higher, it is adviced that you set it up through JRA.
    Implement an RFC server in 7.0:
    http://help.sap.com/saphelp_nw04/helpdata/en/6a/82343ecc7f892ee10000000a114084/frameset.htm
    Implement an RFC server in 7.1 or higher:
    http://help.sap.com/saphelp_nwce72/helpdata/en/43/fd063b1f497063e10000000a1553f6/frameset.htm

  • How to call sqlldr utility in stored procedure

    Hi,
    i want to call sqlldr exe from stored procedure.
    Regards,
    Tushar Josih

    user12044491 wrote:
    currently i am working on oracle release 10g R2.
    i am not very much sure whether all CTL option are available in the external table.Before you decide on the method you should clearly understand the following. SQL*Loader is client side tool while job and external table are server side tools. Therefore, unless you are connecting to oracle from database server or file you are loading is accessible from database server, neither job nor external table will help you. And now back to your question - yes, not all SQL*Loader features are available for external tables but most of the time there is a way around it.
    SY.

  • How to call PL-SQL script/stored procedure from Java?

    Assume I want to call a PL-SQL stored procedure from external Java program.
    How can I do this?
    Is there a simple "Hello world" example for this?
    Peter

    This forum is for Oracle only not for java
    Ug

  • How to call PL-SQL script/stored procedure from BPEL?

    Assume I want to call a PL-SQL stored procedure from BPEL.
    How can I do this?
    Is there a simple "Hello world" example for this?
    Peter

    The database adapter supports calling stored procedures. There is an example called "File2StoredProcedure" that you can use as a reference to get started.

  • How to call VB program from PL/SQL ?

    hi, i use oracle8i and i would like to call program VB from Stored procedur or PL/SQL program.
    Is it possible and how?
    thanks

    If you are trying to invoke a WebService, it shouldn't matter what under what platform that WebService compiled or where it is executing, as long as it is on a shared network. That is the very "definition" of a WebService. You should be able to invoke the webservice via TCP sockets, streaming XML message content.
    If your VB WebService isn't, in reality, a WebService and you need to invoke it as an ActiveX dll that is possible with Oracle COM Automation. The 8i/9i data server must be running on the win32 platform that has the ActiveX dll installed. I'm not sure if there is any DCOM possibilities (though I suspect not). In all circumstances, if you data server is running on a non-win32 platform, you are out of luck.
    If you are trying to invoke an ActiveX application (not a dll) from the 8i/9i data server, you are pretty much out of luck, too.
    Hope that helps,
    Michael

  • Calling DTS package from Stored Procedure

    I am getting error calling DTS package from CF.
    So i want to call DTS package from SQL Server Stored
    Procedure.
    DTS package create text file. So no need of input or output
    parameter.
    What is the syntax?.
    thanks for ur help.

    Ted Kruger explains how this can be done in his blog post
    Run SSIS Package from Stored Procedure
    For every expert, there is an equal and opposite expert. - Becker's Law
    My blog

  • How to generate a report from stored procedure

    I would like to generate a report from stored procedure.
    I used to work on sql server. this can be done as easy as put a select statement at the end of stored procedure.
    The resule can be displayed on the development IDE, like sql developer or consume by Java JDBC client.
    is there equivalent way to do this in Oracle stored procedure?

    Hi,
    What type of report you are looking..for.. ??
    As you said that "I used to work on sql server. this can be done as easy as put a select statement at the end of stored procedure. "
    When you execute it will return the result set and you will display directly on the FrontEnd.. Is my Understanding is correct Up to here.
    See, In oracle you have call some custom stored procedures as you did in SQL Sever, but you have return the Results Sets, with help of Out put paramter, Either Cursors or Varrays..
    or Else you can generate the Html reports based on your requirement, HTML can be used in the stored procedures of Oracle which will generate for your, you need to code it.
    I could not able get the relevant link for your reference.
    I will get back to you on this.
    - Pavan Kumar N

  • How to call a program from FM which acts as popup?

    Hi,
    I need to call a program from FM and once the program is called it needs to be opened as a popup. Maybe we need to assign size when we call from FM or do we need to give size in the program it self?
    I know i can either use the Submit command or Call Transaction command. But that it self will open a full screen which i dont want. It needs to be of a smaller size.
    Any help will be appreciated.
    Thanks

    Hi,
    Try this,
    REPORT ZEX_POPUPSCREEN .
    *&  POPUP SCREEN
    * Table Declaration
    TABLES VBAK.
    * Start of Selection
    START-OF-SELECTION.
      SELECT * FROM VBAK.
        WRITE / VBAK-VBELN HOTSPOT ON.
      ENDSELECT.
    * Display the screen
    AT LINE-SELECTION.
      WINDOW STARTING AT 10 10
             ENDING   AT 40 25.
      WRITE:/ 'VBAK-VBELN, VBAK-KUNNR'.
    Regards,
    Nikhil.

  • How to call one program from another program

    Hai,
      How to call one program through another program.
    Example.
       I have two programs 1.ZPROG1 2. ZPROG2.
    When i execute ZPROG1 at that time it should call ZPROG2.

    Hi ,
    u can use submit statement to call a program .
    DATA: text       TYPE c LENGTH 10,
          rspar_tab  TYPE TABLE OF rsparams,
          rspar_line LIKE LINE OF rspar_tab,
          range_tab  LIKE RANGE OF text,
          range_line LIKE LINE OF range_tab.
    rspar_line-selname = 'SELCRIT1'.
    rspar_line-kind    = 'S'.
    rspar_line-sign    = 'I'.
    rspar_line-option  = 'EQ'.
    rspar_line-low     = 'ABAP'.
    APPEND rspar_line TO rspar_tab.
    range_line-sign   = 'E'.
    range_line-option = 'EQ'.
    range_line-low    = 'H'.
    APPEND range_line TO range_tab.
    range_line-sign   = 'E'.
    range_line-option = 'EQ'.
    range_line-low    = 'K'.
    APPEND range_line TO range_tab.
    SUBMIT report1 USING SELECTION-SCREEN '1100'
                   WITH SELECTION-TABLE rspar_tab
                   WITH selcrit2 BETWEEN 'H' AND 'K'
                   WITH selcrit2 IN range_tab
                   AND RETURN.
    regards,
    Santosh thorat

  • How to call a AS/400 Stored Procedure with a BigDecimal Value?

    Hi,
    Could you pls tell me how to call a stored procedure on the AS/400 which request an input value of packed decimal(10P 4) value.
    I have tried to convert it to a BigDecimal in Java and call the stored procedure as follows but it gave me a decimal point error on the AS/400.
    Could you pls show me where I'm wrong in the following code.
    Thanks
    Jan
    ========Java program to call AS/400 Stored procedure with setBigDecimal()===========
    //Assign the value to String
    string sBDVal = "30"
    //Convert the String value to BigDecimal
    BigDecimal bdAmt = new BigDecimal(sBDVal);
    //Call Stored Procedure with parameters,
    CallableStatement callSP = conn.prepareCall("{call OSCUPDLENS(?,?,?)}");
    // Set in parm values
    callSP.setString(1,"Value 1");
    callSP.setBigDecimal(2,bdAmt);
    callSP.setString(3,"");
    // Register out parameter
    callSP.registerOutParameter(3, Types.CHAR);
    // Execute call to stored procedure
    callSP.execute();
    // Retrieve out parameters
    sErrFlag = callSP.getString(3).trim();
    ========================Create Stored Procedure on AS/400===========================
    c/EXEC SQL
    c+ CREATE PROCEDURE TESTSPROC
    c+ (IN VAL1 CHAR ( 8),
    c+ IN BDAMT DEC (10, 4),
    C+ INOUT ERR CHAR ( 1))
    C+ LANGUAGE RPGLE NOT
    C+ DETERMINISTIC NO SQL EXTERNAL NAME TESTSPROC PARAMETER STYLE
    C+ GENERAL
    c/END-EXEC
    ======RPG program on AS/400 to accept the BigDecimal value to a Packed decimal======
    * Initialize the i/p parameter
    DP#VAL1 S 8A
    DP#AMT S 10P 4
    DP#ERR S 1A
    C*Input parameters
    C *ENTRY        PLIST                          
    C PARM P#VAL1
    C PARM P#AMT
    C PARM P#ERR

    Could you pls show me where I'm wrong in the following codeI don't know, you're doing a lot of things I have never tried. But "decimal data error" most likely means that the stored procedure is expecting packed data and the driver is giving it zoned data, or vice versa. You could confirm that by dumping your variables inside your RPG. If that is your problem, you could work around it by redefining your BDAMT parameter as integer or string and reformatting it in the RPG.

  • How to get a resultset from Stored Procedures

    How to efficiently and portably get resultsets from Oracle stored procedures? Oracle does not seem to follow JDBC standards here. A standard way in Oracle is to use a ref cursor and call getObject() on CallableStatement. However, Oracle seems to get all the data in the resultset in getObject(), which is inefficient and leads to large memory usage when the resultset is large.
    Another way in Oracle is to use getCursor() on an OracleCallableStatement, which is efficient but not portable across different application servers. For example, in WebSphere, this OracleCallableStatement is not available if we want WebSphere to manager the datasource.
    Any ideas will be greatly appreciated. Please email to [email protected]

    Oracle JDBC did not support return a result set, if you are using Oracle 9i, you can use pipeline function, then using the TABLE() function the get the row.
    Good Luck.
    Welcome to http://www.anysql.net/en/

  • Calling shell script from stored procedure.

    Hi Everybody,
    Could anyone tell me how to call a shell script from a stored procedure.
    Thanks,
    Vasu

    You would need to write a Java stored procedure that calls out to the underlying operating system. Tom Kyte has an example of this here
    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:952229840241
    Make sure that you're very aware of the security implications here, however. Your commands will run as the Oracle user on the host operating system, which makes it possible that a coding error and/or an attacker could do something like delete or corrupt Oracle data files, so you'll probably want to harden the code substantially.
    Justin

  • Execute programs from stored procedures

    I will execute a extern program from a stored procedure. Is there anybody who knows that or how to send mail from Oracle without UTL_SMTP?

    See my reply to 'chaitanyadatir' just below your post.
    null

Maybe you are looking for

  • Dynamic table for popup_menu

    I'm trying to attach some dynamic information to a popup_menu (pulldown) object in the export dialog. I'm retrieving the data through an asynchronous task such as: SYPNEventResults = ''; local LrDialogs = import "LrDialogs" local LrHttp = import "LrH

  • Problem with export

    After exporting (via share media browser mac and pc file) a movie, I have a problem with it. It stops on a frame and skips. The audio continues but the video frame stops. It's happened twice, once at about the 1 minute mark and once at the 15 minute

  • Push notification feedback problem

    Hello everybody. I've installed on my iPhone ad-hoc version, so it means distribution one. I've downloaded apns-shart library and tried to test push notifications on that. I have all necessary certificates. I've succeeded to push notifications using

  • Material Master Maintenance

    I am trying to find a document that shows typical material master creation and maintenance process. I know how it is supposed to work but someone already has this document then I do not want to re-invent the wheel. Thanks Raj

  • Non-radio Remote HELP!!

    I have the 5th gen 30gig Ipod. I recently bought the inMotion speaker/docking staion and also the Apple remote(non radio. At the time of purchase the guy at future shop said this remote would be compatible. In the remote instruction it said refer to