|
-
Oct 23rd, 2001, 01:43 AM
#1
problem regarding embedded SQL and Cursors
Hi, I am trying to write cursor in C and using the result of that cursor I will call a stored procedure. But it is giving some error on SQL prompt also. Can you suggest the solution please.
I am giving sample code here
int emp_number[20];
float salary[20];
EXEC SQL DECLARE emp_cursor CURSOR FOR
SELECT empno, sal FROM emp;
BEGIN
EXEC SQL OPEN emp_cursor;
EXEC SQL WHENEVER NOT FOUND do break;
EXEC SQL FETCH emp_cursor
INTO :emp_number, :salary;
EXEC SQL CLOSE emp_cursor;
END;
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|