hi,
In recently, I have a mission for porting a source code from Pro*C. And the database is changed from Oracle to Mysql. The part of original source code(Pro*C) is shown below:
char i_id_no[13+1];
char accn_name[16+1], account[7+1], b_no[20+1], code_type[1];
int ii;
:
:
EXEC SQL DECLARE cursor_1 CURSOR FOR
SELECT accn_name, account, b_no, code_type
FROM ACCOUNTINFO
WHERE id_no = :i_id_no;
EXEC SQL OPEN cursor_1;
for(ii=0;; )
{
EXEC SQL FETCH cursor_1
INTO :accn_name, :account, :b_no, :code_type;
if (sqlca.sqlcode == 1403)
break;
:
:
}
:
:
EXEC SQL CLOSE cursor_1;
How could I make the same functions by mysql C API?
ps.
compiler: gcc
os: RH Linux AS 4.0
Mysql: 5.0