Cursor already open

Item Value
SQLCODE -172
Constant SQLE_CURSOR_ALREADY_OPEN
SQLSTATE 24502
Sybase error code 558
ODBC 2 State 24000
ODBC 3 State 24000

Probable cause 

You attempted to OPEN a cursor that is already open.