Re: Using VC2008 to store bytea, I got AppendChunk error 800a0c93

From: sunpeng <bluevaley(at)gmail(dot)com>
To: "Inoue, Hiroshi" <inoue(at)tpf(dot)co(dot)jp>
Cc: pgsql-odbc(at)postgresql(dot)org
Subject: Re: Using VC2008 to store bytea, I got AppendChunk error 800a0c93
Date: 2014-07-04 06:35:19
Message-ID: CAOYKhLp60KyVBc+21qrkL2dL58+NKLYY0E07e53vON=8OTRMJg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

Yea, I've set *bytea as LO* option in Page 2, but error still exists.
I use ADO instead of DataSource of ODBC.

peng

On Fri, Jul 4, 2014 at 11:49 AM, Inoue, Hiroshi <inoue(at)tpf(dot)co(dot)jp> 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
>
>

In response to

Responses

Browse pgsql-odbc by date

  From Date Subject
Next Message cobainpluto 2014-07-04 11:10:18 Re: Ask for two questions on psqlodbc
Previous Message matevzm 2014-07-04 06:34:21 Re: Connction string lacks some options