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: Mon, 07 Jul 2014 13:02:18 +0900
Message-ID: <53BA1BCA.5070605@tpf.co.jp> (raw)
In-Reply-To: <CAOYKhLpswa2hMbtqWsBpxwo1cX=5OJGM05+CHPONXz4qhT=hFw@mail.gmail.com>
References: <CAOYKhLqC5O8MbvjSLkGHw4zU=3qAjnXUq8cx_dUdJrfSXkmPhw@mail.gmail.com>
	<53B62444.3070701@tpf.co.jp>
	<CAOYKhLp60KyVBc+21qrkL2dL58+NKLYY0E07e53vON=8OTRMJg@mail.gmail.com>
	<53B7448A.2070707@tpf.co.jp>
	<CAOYKhLpswa2hMbtqWsBpxwo1cX=5OJGM05+CHPONXz4qhT=hFw@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-odbc>

(2014/07/07 12:44), sunpeng wrote:
> hr = m_pConnection.CreateInstance("ADODB.Connection");
> sql.Format(_T("Driver=%s;Server=%s;Database=%s"),strDriver,strIP,strDBName);

Please add ";C7=1" which turns on *bytea as lo* option to your
connection string or
directly specify the data source name as the connectiion string
	_T("DSN=%s")
.

> strDriver is "PostgreSQL ANSI" or "PostgreSQL Unicode"

<snip>

>>>
>>>                                   for (long iSize = 0; iSize <
>>>          FreImgSize; iSize++)
>>>                                   {
>>>                                           SafeArrayPutElement(psafe[0],
>>>          &iSize, &pFreImg[iSize]);

Does SafeArrayPutElelment() work as you expect?
The input of the function is psafe[0] and the output is &pFreImg[iSize].

regards,
Hiroshi Inoue

-- 
I am using the free version of SPAMfighter.
SPAMfighter has removed 11419 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: <53BA1BCA.5070605@tpf.co.jp>
Permalink:  ../53BA1BCA.5070605@tpf.co.jp/
Also on:    postgresql.org/message-id/53BA1BCA.5070605@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: <53BA1BCA.5070605@tpf.co.jp>
  References: <CAOYKhLqC5O8MbvjSLkGHw4zU=3qAjnXUq8cx_dUdJrfSXkmPhw@mail.gmail.com> <53B62444.3070701@tpf.co.jp> <CAOYKhLp60KyVBc+21qrkL2dL58+NKLYY0E07e53vON=8OTRMJg@mail.gmail.com> <53B7448A.2070707@tpf.co.jp> <CAOYKhLpswa2hMbtqWsBpxwo1cX=5OJGM05+CHPONXz4qhT=hFw@mail.gmail.com> <53BA1BCA.5070605@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