本资料由 曲师大 Guang15提供
for ( ; ; ) { }
printf (\//若照书上写
/* Fetch next row of the result table */
EXEC SQL FETCH providerCursor INTO :sname,:city:cityInd; /* display data */
printf (\
if ( cityInd< 0)//通过设置指示变量,并判断指示变量的值<0来确
printf (\printf (\
EXEC SQL OPEN providerCursor ;
认和输出null值
else
error:
sqlca.sqlcode编译报语法错 done: }
//断开连接
return 0;
EXEC SQL DISCONNECT ALL;
/* Close the cursor before completing*/ EXEC SQL WHENEVER SQLERROR continue; EXEC SQL CLOSE providerCursor; EXEC SQL COMMIT WORK RELEASE;
1.
31