SQLSetStmtAttr(hstmt,SQL_ATTR_ROW_BIND_TYPE,SQL_BIND_BY_COLUMN,0);

SQLSetStmtAttr(hstmt,SQL_ATTR_ROW_ARRAY_SIZE ,SQLPOINTER(nRows2Read) ,SQL_IS_INTEGER );

nRows2Read=4;

SQLCHAR sBuffer[nRows2Read+1][50];

SQLINTEGER sBuffer_ind[nRows2Read+1];

cliRC = SQLBindCol(hstmt,i+1,SQL_C_CHAR,(SQLPOINTER)(sBuffer) ,16 ,sBuffer_ind);

printf

末尾的终止符---可以在一个数组列中放入多个字符串

在读取时,根据末尾终止符来读字符串

=====================================

之前因为把长度设置为很大很大,“16”这个长度字段设置的不正确使数据不能正常取出,

05-08 15:02