我收到了以下代码:
SQLRETURN ret;
SQLHSTMT stmt, stmt2;
SQLHDESC Ard, Apd;
/* Alloc code here */
SQLExecDirect(stmt, query, SQL_NTS);
SQLExecDirect(stmt2, query2, SQL_NTS);
/* Binding Column in stmt */
SQLGetStmtAttr(stmt, SQL_ATTR_APP_ROW_DESC, &Ard, 0, NULL);
SQLGetStmtAttr(stmt2, SQL_ATTR_APP_PARAM_DESC, &Apd, 0, NULL);
SQLCopyDesc(Ard, Apd);
/* Do stuff to copy into stmt2 table stmt table */
SQLExecDirect(stmt, query3, SQL_NTS); //select another table
/* Do I need here to rebind the APD on the ARD with SQLCopyDesc()*/
我不明白第二次stmt
之后SQLExecDirect
的ARD发生了什么。
绑定列是否从Statement中解除绑定?或绑定列保持绑定?
更简单的说,SQLExecDirect
或SQLExecute
是否会重置声明的ARD,APD,IPD,IRD?
如果另一个语句与此描述符之一与SQLSetStmtAttr
链接,会发生什么?