Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> Re: Insert and select from Oracle long variable
In article <949178228.22338_at_tbird.introweb.nl>,
"Niels Stout" <n.stout_at_voltaire.nl> wrote:
> Hi,
>
> I'd like to store webpages in Oracle using a long variable.
> Has anyone experience filling long variables from a file and
> putting the contents of a long variable to a file?
>
> Any suggestions are welcome.
>
> Niels
Oracle 8 has what you need to do this, if you have O8, have the all the stuff installed and want to mess with it.
An answer under Oracle 7 might be this:
1) store the web page in a file 2) store the fully-qualified path name to that file in the database 3) when that field is needed, use the value in the field (the full
path) to retrieve the data from the file and/or store back into it.
If you really need to store the file itself in the database you could do the following:
If the webpage is in in a field and you only want to display the contents as a web page, just print the field back to the client. It will appear to the client as a normal webpage. You can dispense with the intermediate file altogether.
Since you are doing this from the web and, presumably using some sort of server-side programming language like Perl with CGI, then the files can be manipulated in your program. The files will have the same owner id and group id as the web server.
I'm assuming Unix or Linux here. I assume there would be similar solutions for a Windows-based system.
Hope this helps.
-- Jim Lyons | Network Systems Analyst Entertech - The IC2 Institute | 512-482-0273, ext. 269 University of Texas at Austin | jlyons_at_weblyons.com http://www.weblyons.com Sent via Deja.com http://www.deja.com/ Before you buy.Received on Mon Jan 31 2000 - 00:00:00 CST