What is pro * c?

How is this useful? How can we access data from a database?

+4
source share
3 answers

Pro * C is actually a preliminary compiler for accessing an Oracle database in C code.

You write your code using statements such as:

int sal; EXEC SQL SELECT salary INTO :sal FROM employees WHERE name = 'Diablo, Pax'; if (sal < 100000) printf ("I'm not being paid enough!\n"); 

mixing regular C with Pro * C statements (as you can see), and then you run it through the Pro * C compiler.

What comes of this is a C program in which the Pro * C statements are replaced with equivalent function calls that will do the same.

Then you run it through a real C compiler, and it gives you executables to do whatever tasks you want.

+9
source

Pro C - Oracle Embedded for Use in C and C ++

http://infolab.stanford.edu/~ullman/fcdb/oracle/or-proc.html

+5
source

This webpage introduces the Proc * C language. It seems to be a C dialect that facilitates access to the SQL database. Here is a snippet:

 int main() { int x; char *y; int z; /* ... */ EXEC SQL INSERT INTO emp(empno, ename, deptno) VALUES(:x, :y, :z); 
+2
source

Source: https://habr.com/ru/post/1336968/


All Articles