Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1X3DhP-0000eY-2u for pgsql-odbc@arkaria.postgresql.org; Sat, 05 Jul 2014 00:19:27 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1X3DhO-0003Gx-IH for pgsql-odbc@arkaria.postgresql.org; Sat, 05 Jul 2014 00:19:26 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1X3DhN-0003FG-8U for pgsql-odbc@postgresql.org; Sat, 05 Jul 2014 00:19:25 +0000 Received: from sd.tpf.co.jp ([210.161.239.34]) by magus.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1X3DhH-0000BY-Ik for pgsql-odbc@postgresql.org; Sat, 05 Jul 2014 00:19:24 +0000 Received: (qmail 2967 invoked by uid 512); 5 Jul 2014 00:19:17 -0000 X-Authentication: inoue was authenticated by sd.tpf.co.jp at 5 Jul 2014 00:19:17 -0000 Received: from unknown (HELO ?192.168.1.8?) (183.76.63.174) by sd.tpf.co.jp with SMTP; 5 Jul 2014 00:19:17 -0000 Message-ID: <53B7448A.2070707@tpf.co.jp> Date: Sat, 05 Jul 2014 09:19:22 +0900 From: "Inoue, Hiroshi" User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: sunpeng CC: pgsql-odbc@postgresql.org Subject: Re: Using VC2008 to store bytea, I got AppendChunk error 800a0c93 References: <53B62444.3070701@tpf.co.jp> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-odbc Precedence: bulk Sender: pgsql-odbc-owner@postgresql.org (2014/07/04 15:35), sunpeng wrote: > Yea, I've set *bytea as LO* option in Page 2, but error still exists. > I use ADO instead of DataSource of ODBC. What's the connection string you are using in your ADO app? regards, Hiroshi Inoue > > peng > > > On Fri, Jul 4, 2014 at 11:49 AM, Inoue, Hiroshi > wrote: > > Are you turning on *bytea as LO* option? > > regards, > Hiroshi Inoue > > > (2014/07/04 9:58), sunpeng wrote: > > My server is pg 9.1.13 in win8 64, my client is win xp 32 bit > installed psqlodbc_09_01_0200.zip(ide is VS2008, vc++). > When I store pic binary data to bytea (field is CapturePic) using: > try > { > m_pRecordset->AddNew(); > iTimes++; > > VARIANT bitdata[3]; > > SAFEARRAY *psafe[3] = {NULL, NULL, NULL}; > SAFEARRAYBOUND band[3]; > > if (pFreImg != NULL && FreImgSize > 0) > { > bitdata[0].vt = VT_ARRAY | VT_UI1; > band[0].cElements = FreImgSize; > band[0].lLbound = 0; > psafe[0] = SafeArrayCreate(VT_UI1, 1, > &band[0]); > > for (long iSize = 0; iSize < > FreImgSize; iSize++) > { > SafeArrayPutElement(psafe[0], > &iSize, &pFreImg[iSize]); > } > > > bitdata[0].parray = psafe[0]; > if (bitdata[0].parray != NULL) > { > > m_pRecordset->GetFields()->__GetItem("CapturePic")->__AppendChunk(&bitdata[0]); > } > ... > m_pRecordset->Update(); > ... > }catch() > > I got com_error (at line ...>AppendChunk() ),and see in > AppendChunk(): > HRESULT _hr = raw_AppendChunk(data); > I got: hresult 800a0c93 > > see > http://tutorials.aspfaq.com/__8000xxxxx-errors/why-do-i-get-__800a0c93-errors.html > > > how to resolve it? > > > > -- > I am using the free version of SPAMfighter. > SPAMfighter has removed 11332 of my spam emails to date. > Get the free SPAMfighter here: http://www.spamfighter.com/len > > Do you have a slow PC? Try a Free scan > http://www.spamfighter.com/__SLOW-PCfighter?cid=sigen > > > -- Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-odbc