Hello. I'm trying to make a little database app. It works fine until now... there's my problem. I execute a sql statement, invoke SQLBindCol... and SQLFetch. My program does refresh the window with the next record from my result set : all what i want. Now, i would like to do the same, but with the previous record from my recordset. I have read in the doc that i have to do something like this "SQLSetConnectAttr(hdbc, SQL_ATTR_ODBC_CURSORS, SQL_CUR_USE_ODBC);". I call SQLFetchScroll with SQL_FETCH_PRIOR as parameter but it doesn't work. Please help me. A little snippet would be great.
Posted on 2001-05-31 06:10:00 by Readiosys
maybe your ODBC driver doesnt support all fetch modes, there is a function available since ODBC 3.0 - SQLGetInfo with SQL_xxx_CURSOR_ATTRIBUTES1. Often only fetch_next is supported. You should get the error (SQLSTATE HY106) if unsupported.
Posted on 2001-06-01 05:42:00 by beaster