CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    May 1999
    Location
    Serbia, YUgoslavia
    Posts
    9

    ORACLE and DLL calls

    Did anyone know how to call DLL FROM ORACLE ?


  2. #2
    Join Date
    May 1999
    Posts
    28

    Re: ORACLE and DLL calls

    There are several steps. I would recommend the book Oracle8: PL/SQL Programming by Scott Urman from Oracle Press. It has a good chapter dedicated to External Procedures (which is what Oracle would call a DLL). I'm not sure of all the steps, but here's an overview:
    1) Use the CREATE LIBRARY command to create the data dictionary item for the DLL (ex. testlibrary)
    2) Create a wrapper procedure to map the PL/SQL calls to the C library functions
    CREATE OR REPLACE PROCEDURE TestFunction(
    p_Test1 IN VARCHAR2,
    p_Test2 IN VARCHAR2) AS EXTERNAL

    LIBRARY testlibrary -- Name of example library created in step 1
    NAME "TestCFunction" -- Name of C Function
    PARAMETERS (p_Test1 STRING, -- Parameters that C Function accepts
    p_Test2 STRING);



    3) Use the name "TestFunction" (the name of the wrapper in step 2) to call the procedure from a PL/SQL block.

    This is very abbreviated. There are some other concerns to take into account which is why I recommended the book. Enjoy and I'll try to answer any more questions you have about this.

    Chris R. Wheeler, MCP
    Pensacola Christian College
    Desktop Programmer
    [email protected]

  3. #3
    Guest

    Re: ORACLE and DSN

    Hai,
    How to create an Oracle DSN dynamically from MFC? I can able to create Ms-Access,Ms-excel etc., DSNs dynamically
    using SQLConfigDatasource function. But when i am creating Oracle DSN, Its not adding service name, User id in DSN
    details. So help me for the same.

    Thanking you
    Srinivas

    my Email: [email protected]



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured