Troubleshooting
Problem
"CLI0150E Driver not capable." error may occur when calling SQLSetPos() with SQL_ADD and SQL_LOCK_NO_CHANGE arguments. This typicaly occurs in a Microsoft SQL Server environment using Linked Server.
Symptom
A sequence similar to the following will be displayed in a CLI trace.
SQLSetPos( hStmt=1:1, iRow=1, fOption=SQL_ADD, fLock=SQL_LOCK_NO_CHANGE )
---> Time elapsed - +9.964000E-003 seconds
SQLSetPos( )
<--- SQL_ERROR Time elapsed - +6.722200E-002 seconds
SQLGetDiagRecW( fHandleType=SQL_HANDLE_STMT, hHandle=1:1, iRecNumber=1, pszSqlState=&63e3de98, pfNativeError=&63e3da7c, pszErrorMsg=&63e3da98, cbErrorMsgMax=512, pcbErrorMsg=&63e3da80 )
---> Time elapsed - +9.619000E-003 seconds
( iRowNumber=-2, iColumnNumber=-2 )
SQLGetDiagRecW( pszSqlState="S1C00", pfNativeError=-99999, pszErrorMsg="[IBM][CLI Driver] CLI0150E Driver not capable. SQLSTATE=S1C00", pcbErrorMsg=62 )
<--- SQL_SUCCESS Time elapsed - +1.816940E-001 seconds
Cause
A cursor type of SQL_CURSOR_STATIC is being used, which means static and read only.
Environment
Resolving The Problem
Add CLI keywords PATCH2=6 in the db2cli.ini file. This will only help applications such as Microsoft SQL Server Linked Server that do not use scrollable cursors for other reasons than adding new rows.
For example:
[DATABASE_NAME]
PATCH2=6
Explanation:
PATCH2=6
Forces the driver to return a message indicating that scrollable cursors are not supported. This setting is needed by some applications (such as Visual Basic) that make use of LOBs or that do not need or want scrollable cursors to be used, even though they have been explicitly requested by the application.
Related Information
Was this topic helpful?
Document Information
Modified date:
16 June 2018
UID
swg21438706