Skip to content

Latest commit

 

History

History
30 lines (24 loc) · 1.42 KB

implicit-cursor-conversions-odbc.md

File metadata and controls

30 lines (24 loc) · 1.42 KB
title description author ms.author ms.date ms.service ms.subservice ms.topic helpviewer_keywords
Implicit Cursor Conversions (ODBC)
Implicit Cursor Conversions (ODBC)
markingmyname
maghan
03/06/2017
sql
native-client
reference
ODBC cursors, implicit cursor conversions
implicit cursor conversions
cursors [ODBC], implicit cursor conversions

Implicit Cursor Conversions (ODBC)

[!INCLUDE SQL Server]

Applications can request a cursor type through SQLSetStmtAttr and then execute a 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 Server 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.

See Also

Cursor Programming Details (ODBC)