Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2003

    Angry Unanswered: Oracle 8 ODBC driver problem/bug ? select * with CLOB.

    Can anyone confirm this ?

    It looks like this is a bug in the Oracle 8i ODBC driver.
    I've tried everything I can think of. I'm using

    My code works fine with the MS Oracle, Oracle
    and PostgreSQL ODBC drivers (talking to a PostgreSQL DB obviously).

    I'm simply doing a "select *" from a table with a CLOB field.
    (long when using MS Oracle)

    I am retrieving multiple rows; 30 -
    SQLSetStmtAttr(m_hstmt, SQL_ATTR_ROW_ARRAY_SIZE, (SQLPOINTER)30, 0);
    and then using SQLSetPos() and SQLGetData() to retrieve all my
    CLOB data for each of the rows.

    I do a

    before the SQLExecDirect() of the SQL,
    so I can use SQLSetPos() on the returned result set.

    The SQLFetchScroll() always returns SQL_NO_DATA.
    Also the SQLExecDirect() returns SQL_SUCCESS_WITH_INFO, the error message being "option value changed". I'm assuming it is refering to the SQL_CURSOR_STATIC, and it looks like it is changing it to a SQL_CURSOR_KEYSET_DRIVEN.

    I call these after the SQLExecDirect().

    SQLSetStmtAttr(m_hstmt, SQL_ATTR_ROW_ARRAY_SIZE, (SQLPOINTER)30, 0);

    SQLSetStmtAttr(m_hstmt, SQL_ATTR_ROW_STATUS_PTR, m_rowStatusArray, 0);

    SQLSetStmtAttr(m_hstmt, SQL_ATTR_ROWS_FETCHED_PTR, &m_numRowsFetched, 0);

    I really need to get this to work with the Oracle 8 driver.

    Any suggestions, and I doing something wrong here ?

    If I set my fetch size (SQL_ATTR_ROW_ARRAY_SIZE) to 1 it works OK.

  2. #2
    Join Date
    Aug 2003

    Re: Oracle 8 ODBC driver problem/bug ? select * with CLOB.


    If I set the cursor to SQL_CURSOR_DYNAMIC it works
    (but I shouldn't have to do that !)

    The question now is what is going to be more efficient.

    Set the cursor to SQL_CURSOR_FORWARD_ONLY and fetch one record at a time (but presumably the ODBC driver is caching more records ?)

    Or set the cursor to SQL_CURSOR_DYNAMIC and read multiple records (at the moment I fetch 30).

    Any thoughts anyone ?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts