Re: PL/SQL: Reading Blobs

From: Bastiaan Schaap <-nospam-bschaap_at_desyde.nl>
Date: Sat, 21 Jul 2001 21:50:48 GMT
Message-ID: <5KiV6.5$TO1.431_at_psinet-eu-nl>


"Gerry Jacobs" <gee_jay__at_yahoo.com> wrote in message news:ce2b54c8.0106110725.7809ed27_at_posting.google.com...
> create or replace function load_filedata(pid number, pstart number, psize
 number)
> RETURN raw
> IS retval raw;
> BEGIN
> select dbms_lob.substr(filedata, psize, pstart) into retval from table
 where id=pid;
> RETURN retval;
> END;
After compiling you should issue the command: SHOW ERRORS, this will show you all errors that occurred during compilation. But just looking at the code I can see two errors already:
1. you should specify a size for the raw variable retval 2. you can't name a table 'table', since table is a reserved word, although I sincerely hope you only used it as a simple name just for this example...

So after compiling, give the SHOW ERRORS command, debug your code using these messages. Just like Sybrand said: you can't expect us to guess the errors.... And if you like for us to get the errors out, also provide your billing address ;-))

HTH,

--
Bastiaan Schaap

________________________________
Being politically correct means always having to say you're sorry.
Received on Sat Jul 21 2001 - 23:50:48 CEST

Original text of this message