Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: sqlplus instead of PRO*C for simple DB queries from C?
I don't think anyone could quarrel about this approach with the facts as
simple as you describe... I have done simular things via a UNIX script which
generated the appropriate script, executed it, called the program to process
the generated data then deleted the data file and the SQL script file(to
avoid eatting up disk space).
The bonus is that It would be very easy to maintain...Especially if you don't have "C" folks on staff.
Alex
Thomas Leitner wrote in message <767nfa$dfr_at_fstgal00.tu-graz.ac.at>...
>Hi,
>
>I'm about to make plans for a simple utility running under Unix and
>written in C which should query numerical values from an Oracle DB,
>calculate some pretty graphics from it and show the graphics on the
>screen. There is not much user interaction required other than to
>start the program, look at the graphics.
>
>Now for the DB query, I think that PRO*C would be kind of an overkill.
>So I'm thinking of splitting the whole story into two parts: Part 1
>is a shell script which just fires off sqlplus with the appropriate SQL
>select command and spools the output into an intermediate file. There are
>not many rows to be queried so the file should not grow too large. The
>second part written in C just reads this file and processes the data.
>
>Question: Are there any arguments against an implementation like this?
>
>Thanks // Tom
>--
>Tom Leitner Dept. of Communications, Graz Univ. of
Technology,
>tom_at_finwds01.tu-graz.ac.at Inffeldgasse 12, A-8010 Graz / Austria / Europe
>PGP public key @ http://wiis.tu-graz.ac.at/people/tom.html
Received on Mon Dec 28 1998 - 19:25:51 CST