Home » Developer & Programmer » Precompilers, OCI & OCCI » new to Pro *C
new to Pro *C [message #94013] Sat, 23 August 2003 21:24
umang
Messages: 4
Registered: August 2003
Junior Member
Hi

I started exploring Pro *C my self. I have oracle 8 on win XP. I created one small test program, but gives some error. can some one help me in how to complie .pc programs and view results??!!

I copied my test code here.

char emp_name[[20]];
int emp_number, dept_number;
float salary;

EXEC SQL WHENEVER NOT FOUND DO break;
EXEC ORACLE OPTION (HOLD_CURSOR=NO);

EXEC SQL DECLARE emp_cursor CURSOR FOR
SELECT empno, deptno FROM emp;

EXEC SQL OPEN emp_cursor;
printf(
"Employee Number Departmentn--------------------------n");
for (;;)
{
EXEC SQL FETCH emp_cursor INTO :emp_number, :dept_number;
printf("%dt%dn", emp_number, dept_number);
}

EXEC SQL WHENEVER NOT FOUND CONTINUE;
Previous Topic: Linking error with VC++
Next Topic: Database Delay
Goto Forum:
  


Current Time: Mon Jun 27 00:42:13 CDT 2022