Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Can I do external procedure calls with Personal Oracle 8.1.7 - it doesn't work

Re: Can I do external procedure calls with Personal Oracle 8.1.7 - it doesn't work

From: Brian Pacitti <brian.pacitti_at_infotechnics.co.uk>
Date: Fri, 5 Jul 2002 09:03:38 +0000 (UTC)
Message-ID: <ag3ncn$1jh$1@venus.btinternet.com>


I worked it out. Here was the solution in case anyone has a similar problem

My server had a domain name set i.e. in the sqlnet.ora on the server it has names.default_domain = xxxx.co.uk

The server tnanames.ora was correctly set up to use this domain i.e. extproc_connection_data.xxx.co.uk =.........

The problem was I had forgotten to change the tnanames on the client PC and it still had extproc_connection_data. =.........

So it worked when run from the server but not from SQL*Plus on the PC

"brian" <brian.pacitti_at_btinternet.com> wrote in message news:ag2ih6$h0t$1_at_paris.btinternet.com...
> Hi there,
>
> I am trying to run an external DLL from within PL/SQL and am getting an
> ora-28575 error. I am running Personal Oracle 8.1.7 on Windows 98.
>
> I have read the copious number of posts on the subject and my
tnsnames.ora,
> listener.ora and sqlnet.ora appear to be set up correctly. In any case
this
> is a new installation of Personal Oracle 8.1.7 and the .ora configurations
> for external procedure calls is done automatically on installation. Also I
> can run the extproc.exe from MS-DOS.
>
> I am testing this by trying to call a windows function from one of the
> standard windows DLLs but am getting an ora-28575. This is what I am
doing:
>
>
> CREATE OR REPLACE LIBRARY dlltest_library AS
> 'c:\windows\system\advapi32.dll' ;
> /
> CREATE OR REPLACE function dlltest_function (V IN OUT VARCHAR2, W IN OUT
> long) return boolean AS
> external name "GetUserNameA" library dlltest_library;
> /
> declare
> lb_rtn boolean;
> ls_username varchar2(30);
> ll_length long;
> BEGIN
> ll_length := 255;
> ls_username := ' ';
> lb_rtn := dlltest_function (ls_username, ll_length );
> dbms_output.put_line('username = '||ls_username);
> END;
> /
>
> Is there any other configuration I must do (parameter in the init.ora for
> example) to get this to work ?
>
> I never had much hair before I started this task anyway !!
>
> Any help would be much appreciated although I guess I am asking the same
> question as a number of other posts.
>
> Thanks
> Brian
>
>
>
>
>
>
Received on Fri Jul 05 2002 - 04:03:38 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US