Skip to Main Content

Breadcrumb

Question and Answer

Connor McDonald

Thanks for the question, hima bindu.

Asked: April 25, 2017 - 8:40 pm UTC

Last updated: May 02, 2017 - 2:52 am UTC

Version: Linux version 2.6.18-274.12.1.el5, gcc version 4.1.2

Viewed 1000+ times

You Asked

Pro *C
Hi Tom-
Linux version 2.6.18-274.12.1.el5, gcc version 4.1.2

I would like to learn Pro *c programming from the beginning. Is there any way to write, run programs. I had stuck up with few issues when I self-started learning it. Plz, suggest me the process, environments set up like makefile, .rlist file etc to follow. Appreciate your help.!!

I wanted to write a program to connect with oracle DB, do write select queries, loopings, branching etc.

Thanks
Hima

and Connor said...

Best way is to install the demos from the examples installation media. When you download Oracle, one of the download files is called "Examples",

http://www.oracle.com/technetwork/database/enterprise-edition/downloads/oracle12c-linux-12201-3608234.html

SAMPLES_12C

This adds a full set of pro*c demo source programs in your database home

Rating

  (3 ratings)

Is this answer out of date? If it is, please let us know via a Comment

Comments

To Hima

J. Laurindo Chiappa, April 29, 2017 - 5:09 pm UTC

Hi : nowadays I work primarily as a DBA, but some years ago I had the privilege of working with some very smart pro*C programmers, and the main advice that I received was to learn C fundamentals first (ie, pointers, arrays, header files usage/inclusion, memory allocation/deallocation, etc) - only after that is OK then I would go for pro*C specifics... I would include in that 'basics' section the learning of how to use your C compiler, too...

So my recommendation is : if you do not master it, go for C basics (could be K&R classic book, but a ton of other resources for this exists in the internet, google for it), after that THEN you go for demos and tutorials - besides the Oracle-provided ones (** and ** the pro*C-related Oracle docs), I point you to http://infolab.stanford.edu/~ullman/fcdb/oracle/or-proc.html and http://programmingexamples.wikidot.com/pro-c-tutorial as good ones...

Best regards,

J. Laurindo Chiappa
Connor McDonald
May 01, 2017 - 7:08 am UTC

Thanks for the references.

Where to use Pro*C

Milind, May 01, 2017 - 1:55 pm UTC

Hi Connor,

Can you give us some idea about test cases for Pro*C?
When PL/SQL is powerful and provides most of the required functionalities for processing of data efficiently, then where to use Pro*C? Now-a-days how many people may be using Pro*C?

Warm Regards.
Milind
Connor McDonald
May 02, 2017 - 2:52 am UTC

There is still a lot of C and C++ being written out there, and a good chunk of that code will need to access the database.

So you'll need either Pro*C or OCI, the former being much easier to digest if you're a database person.

I worked with a client where the software was 100% C++. They tried OCI and also tried OCCI, but ultimately ended up with Pro*C for the productivity benefits. They also moved performance critical functionality to PL/SQL with Pro*C calling that.

Pro *c - Thank you

hima bindu baddila, May 01, 2017 - 2:01 pm UTC

Thank you, Connor McDonald.I will download the install and follow the examples.