Why to use Precompilers....................?? [message #306820] |
Mon, 17 March 2008 00:27  |
Manoj.Gupta.91
Messages: 239 Registered: March 2008 Location: Delhi
|
Senior Member |
|
|
Hi All,
I'm new in this forum but I'm experienced with PL/SQL and C. I've something to discuss at first level.
1. Why to use Precompilers like Pro *C, Pro *COBOL etc ?
2. Is there anything that we cannot achieve using PL/SQL so we need precompilers ?
3. Advantages of Pro *C over PL/SQL.
4. Does Pro *C programme creates process at client end and distributes load etc.
Any additional information is highly welcomed and appriciated. Lets make it a discussion point. Once I start with this I'll surely go for Oracle Reference books.
Thanks & Regards
Manoj
|
|
|
|
Re: Why to use Precompilers....................?? [message #306889 is a reply to message #306860] |
Mon, 17 March 2008 03:05   |
Manoj.Gupta.91
Messages: 239 Registered: March 2008 Location: Delhi
|
Senior Member |
|
|
Thanks Michel Cadot,
I've 2,3 more questions
1. Where to store Pro *C programme. Like we can have procedures stored in database, local to form, local to report etc.
2. How to create a simple program in Pro *C ?
3. Can I call a Pro *C program from SQL *Plus, Forms, Reports etc. If yes then how ?
4. Can you give me simple steps to create a very simpler programme in Pro *C. Like it is simply selecting count from EMP table.
Will it work ????
#include <stdio.h>
#include <sqlca.h>
void main()
{
EXEC SQL BEGIN DECLARE SECTION;
int emp_count = 0 ;
char *connstr = "scott/tiger";
EXEC SQL END DECLARE SECTION;
EXEC SQL WHENEVER SQLWARNING CONTINUE;
EXEC SQL CONNECT :connstr;
EXEC SQL SELECT COUNT(*)
INTO emp_count
FROM EMP ;
printf("Total Employee = %d\n", emp_count);
}
Thanks & Regards
Manoj
[Updated on: Mon, 17 March 2008 03:15] Report message to a moderator
|
|
|
|