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: Pro*C makes executable very large?

Re: Pro*C makes executable very large?

From: Ed Prochak <edprochak_at_adelphia.net>
Date: Sat, 28 Jun 2003 22:28:48 GMT
Message-ID: <3EFE1B1F.1070501@adelphia.net>


Mike Smith wrote:
> Ed Prochak <edprochak_at_adelphia.net> wrote in message news:<3EF90381.2060106_at_adelphia.net>...
>

>>Mike Smith wrote:
>>
>>>Hi, I tried some simple code (C++) to try out ProC on hp-ux,
>>>and I end up with an executable of size 5 Mb (!) when I compiled the
>>>code.
>>
>>That sounds about right.

>
> Ok, I stop worry about that for the moment.
>
>
>>>Is there anyway to reduce this size (I pretty much linked to all
>>>libraries to be able to compile the thing), should I be worried about
>>>this size?
>>>
>>>I am also looking for some sample code in C++ to use Pro*C, is it not
>>>possible to create a class myDatbase with different methods connect,
>>
>>Well it is Pro*C not ProC++. And besides, what methods are you going to put 
>>for you embedded SELECT statement? You don't want to make a new connection for 
>>each SELECT statement do you?

>
> hmm, no I would only have one instance of the class....I was aiming
> for capsulate away all the proC code away and be able to have methods
> like this:
>
> //at the beginning of the program
> myDatabase->connect()
>
> //will execute a select statement fetching all employees for a
> specific departmet
> myDatabase->fetchEmployee( departNo)
>
> //now get the first of the employees (which are stored in some
> internal vector in the class)
> myEmp = myDatabase->getFirstEmployee()
>
>
> //at the end
> myDatabase->disconnect()
>
> Thinking about it, I am not sure if there will be a huge advantage
> compared to having global functions, but the possiblity to have
> information stored in a class would be nice, but..hm...I have to think
> about it a bit :)
> I mean, basically I can create my class and make only this class use
> the functions..

That does make more sense than the object partitioning I assumed. And you are right in that it does appear to have about equal trade off as global functions. Why do you have such a fear of global functions?

Actually you make them into a library, separate source file with local variables and functions. C encapsulates code as well as C++ does.

But we are drifting off topic.

-- 
Ed Prochak
running    http://www.faqs.org/faqs/running-faq/
netiquette http://www.psg.com/emily.html
--
"Two roads diverged in a wood and I
I took the one less travelled by
and that has made all the difference."
robert frost
Received on Sat Jun 28 2003 - 17:28:48 CDT

Original text of this message

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