Article ID: 175966
Article Last Modified on 5/20/2003
1) Full Connect: (connect to Pubs).
2) SQLDisconnect:
3) SQLSetConnectOption:
fOption=Conn: SQL_ODBC_CURSORS=110,
vParam=SQL_CUR_USE_DRIVER=2
4) SQLDriverConnect: (reconnect to Pubs)
5) SQLSetConnectOption:
fOption=Conn: SQL_AUTOCOMMIT=102,
vParam=SQL_AUTOCOMMIT_OFF=0
6) SQLAllocStmt:
7) SQLSetStmtOption:
fOption=SQL_CURSOR_TYPE=6,
vParam=SQL_CURSOR_STATIC=3
8) SQLSetConnectOption:
fOption=1204 (#def value for SQL_PRESERVE_CURSORS)
vParam=1 (#def value for SQL_PC_ON)
9) SQLPrepare:
select emp_id, fname from employee where job_id = 13
10) SQLExecute:
11) SQLTransact:
12) Bind Col All:
13) SQLSetStmtOption:
fOption=SQL_ROWSET_SIZE=9,
vParam=20,
14) SQLExtendedFetch:
fFetchType=SQL_FETCH_NEXT=1
irow=0, pcrow=VALID, rgfRowStatus=VALID
Return: SQL_ERROR=-1
szSqlState = "S1010", *pfNativeError = 0, *pcbErrorMsg = 56
szErrorMsg="[Microsoft][ODBC Driver Manager] Function sequence error"
The script above will run successfully if you do either of the following:
Keywords: kbbug kbprogramming kbcode KB175966