Re: BFILE with Oracle 8i on Windows NT?
Date: Sat, 03 Jul 1999 13:15:47 GMT
Message-ID: <37810c88.2937584_at_newshost.us.oracle.com>
A copy of this was sent to "Finn Ellebaek Nielsen" <fen_at_changegroup.dk> (if that email address didn't require changing) On Sat, 3 Jul 1999 14:37:18 +0100, you wrote:
>Hi Rob.
>
>Your example is quite incorrect. You have to use a backslash instead of a
>slash in the directory name, first argument for BFILENAME must always be in
>upper case (stupid, but that's the way it it, it looks in the Data
it doesn't HAVE to be in upper case -- it must be in the "correct" case.
when they created the directory, they named it my_dir. Object names, unless quoted, are rolled to uppercase. So, you have a directory object called MY_DIR. The bfilename api takes the name of a directory object in as a string. this string is case sensitive. you need to send 'MY_DIR' to bfilename, not 'my_dir'. If you really want to send 'my_dir' to bfilename you must:
create directory "my_dir" for 'c:\temp';
note the double quotes -- this creates a directory with an object name in lower (mixed) case. Now you can bfilename( 'my_dir', 'doc1.txt' );
>Dictionary for the directory with the given name), the return code from
>FILEXISTS is 1 for success, so check with >= 1, and you have used C syntax
>for the if statement.
>
>This should work:
>
>create directory my_dir as 'c:\temp';
>
>declare
> osFile BFILE := BFILENAME('MY_DIR', 'doc1.txt');
> rc INTEGER;
>begin
> rc := dbms_lob.FILEEXISTS( osFile );
> if rc >= 1 then
> dbms_output.put_line ('yes');
> else
> dbms_output.put_line ('no');
> end if;
>end;
>/
>
>HTH.
>
>Finn
>
>Rob Mitchell <rjmitchell_at_mediaone.net> wrote in message
>news:zrBe3.2000$kL2.140131_at_ndnws01.ne.mediaone.net...
>> Hello,
-- See http://govt.us.oracle.com/~tkyte/ for my columns 'Digging-in to Oracle8i'... Current article is "Part I of V, Autonomous Transactions" updated June 21'st Thomas Kyte tkyte_at_us.oracle.com Oracle Service Industries Reston, VA USA Opinions are mine and do not necessarily reflect those of Oracle CorporationReceived on Sat Jul 03 1999 - 15:15:47 CEST