pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Inoue, Hiroshi <inoue@tpf.co.jp>
To: sunpeng <bluevaley@gmail.com>
Cc: pgsql-odbc@postgresql.org
Subject: Re: Using VC2008 to store bytea, I got AppendChunk error 800a0c93
Date: Fri, 04 Jul 2014 12:49:24 +0900
Message-ID: <53B62444.3070701@tpf.co.jp> (raw)
In-Reply-To: <CAOYKhLqC5O8MbvjSLkGHw4zU=3qAjnXUq8cx_dUdJrfSXkmPhw@mail.gmail.com>
References: <CAOYKhLqC5O8MbvjSLkGHw4zU=3qAjnXUq8cx_dUdJrfSXkmPhw@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-odbc>

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



view thread (7+ messages)  latest in thread

Message-ID: <53B62444.3070701@tpf.co.jp>
Permalink:  ../53B62444.3070701@tpf.co.jp/
Also on:    postgresql.org/message-id/53B62444.3070701@tpf.co.jp

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-odbc@postgresql.org
  Cc: inoue@tpf.co.jp, bluevaley@gmail.com
  Subject: Re: Using VC2008 to store bytea, I got AppendChunk error 800a0c93
  In-Reply-To: <53B62444.3070701@tpf.co.jp>
  References: <CAOYKhLqC5O8MbvjSLkGHw4zU=3qAjnXUq8cx_dUdJrfSXkmPhw@mail.gmail.com> <53B62444.3070701@tpf.co.jp>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox