共用方式為


Implicit Cursor Conversions (ODBC)

Applications can request a cursor type through SQLSetStmtAttr and then execute an SQL statement that is not supported by server cursors of the type requested. A call to SQLExecute or SQLExecDirect returns SQL_SUCCESS_WITH_INFO and SQLGetDiagRec returns:

szSqlState = "01S02", *pfNativeError = 0,
szErrorMsg="[Microsoft][SQL Native Client]Cursor type changed"

The application can determine what type of cursor is now being used by calling SQLGetStmtOption set to SQL_CURSOR_TYPE. The cursor type conversion applies to only one statement. The next SQLExecDirect or SQLExecute will be done using the original statement cursor settings.

請參閱

概念

Cursor Programming Details (ODBC)

其他資源

使用隱含資料指標轉換

說明及資訊

取得 SQL Server 2005 協助