Home » Developer & Programmer » Precompilers, OCI & OCCI » Why to use Precompilers....................??
|
|
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
|
|
|
|
Goto Forum:
Current Time: Thu Apr 17 00:58:09 CDT 2025
|