Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 6119C1337B86 for ; Wed, 10 Nov 2010 00:25:23 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 97850-10 for ; Wed, 10 Nov 2010 04:25:16 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sd.tpf.co.jp (sd.tpf.co.jp [210.161.239.34]) by mail.postgresql.org (Postfix) with SMTP id 5DF9F1337B6F for ; Wed, 10 Nov 2010 00:25:15 -0400 (AST) Received: (qmail 25189 invoked by uid 512); 10 Nov 2010 04:25:14 -0000 Received: from unknown (HELO ?127.0.0.1?) (100.0.32.252) by sd2.tpf-fw-c.co.jp with SMTP; 10 Nov 2010 04:25:14 -0000 Message-ID: <4CDA1EA2.3090801@tpf.co.jp> Date: Wed, 10 Nov 2010 13:25:06 +0900 From: Hiroshi Inoue User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; ja; rv:1.8.1.24) Gecko/20100228 Thunderbird/2.0.0.24 Mnenhy/0.7.6.0 MIME-Version: 1.0 To: Adrien de Croy CC: "pgsql-odbc@postgresql.org" Subject: Re: Access violation (0xC0000005) in PSQLODBC35W.DLL when calling SQLDescribeColW References: <6B48F83ECA0ABA4F9E360E8E0A1CDFFC35E4AE0E@HALLEY.maeil.pt> <4CD09C7F.9070403@tpf.co.jp> <4CD0D584.30908@qbik.com> <4CD11F17.5050207@tpf.co.jp> <4CD24723.5020203@qbik.com> <4CD3374A.1040003@qbik.com> <4CD3C5F1.80606@tpf.co.jp> <4CD9F9ED.3000201@qbik.com> <4CDA16F7.10402@tpf.co.jp> <4CDA19C5.8070607@qbik.com> In-Reply-To: <4CDA19C5.8070607@qbik.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=3.157 tagged_above=-10 required=5 tests=BAYES_00=-1.9, DNS_FROM_RFC_BOGUSMX=1.668, RCVD_ILLEGAL_IP=3.399, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: *** X-Archive-Number: 201011/24 X-Sequence-Number: 10509 (2010/11/10 13:04), Adrien de Croy wrote: > > Hi > > I have some helper classes to fetch fields from a record, a helper class > to manage iteration through a result set. > > If I call my fetch helper function for some field ordinal it works fine > the first time. If I call it again (without having called any method to > change the current row in the result set) it fails on the same ordinal, > but works on other ordinals. > > So, it looks to me like the fetch call is cleaning up the field data > when you fetch, If the helper function calls SQLGetData() for the column, yes. SQLGetData() cleans up data which it returns to the caller and returns SQL_NO_DATA when all data was returned to the caller. You can divide into multiple SQLGetData() calls using this feature when a column has a big data. regards, Hiroshi Inoue