Re: [Q] SQLMoreResults causes error in SQLFetchScroll - Mailing list pgsql-odbc

From V S P
Subject Re: [Q] SQLMoreResults causes error in SQLFetchScroll
Date
Msg-id 1242623801.9549.1315946739@webmail.messagingengine.com
Whole thread Raw
In response to Re: [Q] SQLMoreResults causes error in SQLFetchScroll  (Hiroshi Inoue <inoue@tpf.co.jp>)
List pgsql-odbc
Hi
thank you,

unfortunately there is no way to do that (as the OTL library
relies on RowCount  to be an independent function
and it cannot be mixed with other operations

(because then getting row count for Insert/Delete/Update would
require a completely different function flow then for selects)

So cannot even suggest OTL maintainer to implement this, as there
is no feasable way.

Is this an expected behavior (that is an ODBC spec recommends this)?


thank you,
Vlad


On Mon, 18 May 2009 12:27 +0900, "Hiroshi Inoue" <inoue@tpf.co.jp>
wrote:
> V S P wrote:
> > Sorry forgot to mention the actual error I am getting:
> >
> > http://pastebin.com/d49e830c0
> >
> > SQLSTATE = HY010
> > NATIVE ERROR = 0
> > MSG = [Microsoft][ODBC Driver Manager] Function sequence error
>
> Please do fetch operations for each result. For exmaple you
> can do fetch operations at *// Do fetch operations here *
> below.
>
> regards,
> Hiroshi Inoue
>
> 174./***********************************************************/
> 175./* PROBLEM:                                                */
> 176./* IF YOU COMMENT THE BELOW LOOP OUT  SQLFetchScroll works */
> 177./***********************************************************/
> 178.
> 179.        do
> 180.        {
> 181.          rc = SQLRowCount(hstmt, &rpc);
> 182.          if (rc!=SQL_SUCCESS)
> 183.          {
> 184.            break;
> 185.          }
> 186.          rowsum += rpc;
>
>     // Do fetch operations here
>
> 187.          rc = SQLMoreResults(hstmt);
> 188.    } while (rc==SQL_SUCCESS);
>
>
--
  V S P
  toreason@fastmail.fm

--
http://www.fastmail.fm - Accessible with your email software
                          or over the web


pgsql-odbc by date:

Previous
From: Hiroshi Inoue
Date:
Subject: Re: [Q] SQLMoreResults causes error in SQLFetchScroll
Next
From: Timothy Madden
Date:
Subject: How to transfer binary data into a BIT VARYING column ?