Here's another strange error I'm getting when using ODBC to access
MySQL. This time ODBC is being more informative, although all the
documentation I've looked at, claims that the function in question
(SQLSetPos) should not return the error!
I have a result set that has been opened for update.
I am trying to delete the current row with a call to SQLSetPos:
rc = SQLSetPos( hStmt, nRow, SQL_DELETE, SQL_LOCK_NO_CHANGE );
This reports the ODBC Error HY106, Native Error 534.
"Fetch type out of range"
(All the MySQL errors I've seen are in the 1000s or 2000s)
nRow is the current row, retrieved by a call to SQLGetStmtAttr:
rc = SQLGetStmtAttr(hStmt, SQL_ATTR_ROW_NUMBER, &nRow, sizeof(nRow), NULL);
The SQL_ATTR_CONCURRENCY attribute has been set to SQL_CONCUR_LOCK.
I can delete a row by simply executing the SQL statement, but for
various reasons it would be very good if I can delete a row from a
result set. Has anyone seen this odd error before? Any clues?
Or perhaps an alternative approach to deleting a row from a result set?
Thanks,
Richard
--
Richard Marsden
Winwaed Software Technology, http://www.winwaed.com
http://www.mapping-tools.com for MapPoint tools and add-ins