Scroll out of range
- From: Claude Schneegans <schneegans@xxxxxxxxxxxxxxxx>
- Date: Thu, 01 Dec 2005 18:09:05 -0500
Hi,
I have an ODBC datasource on a Foxpro database.
Table mTable contains more than 34000 records.
What I want is to get records after a certain number of records.
I'm trying to use SQLFetchScroll, but it always return an error with SQLState = HY106
which means "Fetch type out of range", even if I set the cursor to position 1.
Any idea what the problem could be?
Thanks.
SQLUINTEGER scrollable = SQL_SCROLLABLE;
// Bind arrays to NOM and NAM columns. SQLBindCol(hstmt, 1, SQL_C_CHAR, &nom, STR_LEN, &nbTemp); SQLBindCol(hstmt, 2, SQL_C_CHAR, &nam, STR_LEN, &nbTemp);
// Execute a statement to retrieve rows from the table.
SQLSetStmtAttr(hstmt, SQL_ATTR_CURSOR_SCROLLABLE, &scrollable, 0);
retcode = SQLExecDirect(hstmt, "SELECT field1, field2 FROM myTable", SQL_NTS);
retcode = SQLFetchScroll(hstmt,SQL_FETCH_ABSOLUTE,1);
.
- Prev by Date: number of rexords in a record set
- Next by Date: Would this ODBC connect string work for MSDE? (conn string for SQL Server)
- Previous by thread: number of rexords in a record set
- Next by thread: Would this ODBC connect string work for MSDE? (conn string for SQL Server)
- Index(es):