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

Home -> Community -> Usenet -> c.d.o.misc -> Re: embedded SQL for Oracle

Re: embedded SQL for Oracle

From: Richard J Woodland <richwoodland_at_interfacefamily.com>
Date: 1997/06/24
Message-ID: <33AFD874.420F@interfacefamily.com>#1/1

Michael Polikoff wrote:
>
> I'm currently working on a databasing project in which I'm designing an
> applications interface in HTML. In order to interface with the database
> (Oracle), I need to write CGI scripts with embedded SQL. I know this
> can be accomplished with C or Visual Basic, but I don't have time to
> learn a new language. Does anyone know how this could be done with
> Perl?
>
> Desperate for any help anyone could give me -- even a link to a good
> source of info. Thanks.
>
> Mike Polikoff
> michael_at_uss.net
> mpolly_at_miint.net

I simply place SQL statements into a temporary file, written by the perl cgi script, then use the 'system' statement to execute sqlplus, directing the output to another temp file. Open the temp file, parse, produce response html and send to standard output. Voila!

Not the prettiest way, but it does work fine. Another alternative is to use Oracle Web Server, which lets you write PL/SQL cgi scripts to perform the same operations, with considerably less pain. However, I still rather like the perl/sqlplus approach, as I have all the power of perl to generate ad-hoc SQL queries, rather than trying to use the dynamic sql from within PL/SQL. Its all a question of preferences!!

If you need any more info, you can contact me at richwoodland_at_interfacefamily.com Received on Tue Jun 24 1997 - 00:00:00 CDT

Original text of this message

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