Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1X408N-0007Z0-9q for pgsql-odbc@arkaria.postgresql.org; Mon, 07 Jul 2014 04:02:31 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1X408M-0000yT-65 for pgsql-odbc@arkaria.postgresql.org; Mon, 07 Jul 2014 04:02:30 +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 1X408L-0000yN-MD for pgsql-odbc@postgresql.org; Mon, 07 Jul 2014 04:02:29 +0000 Received: from sd.tpf.co.jp ([210.161.239.34]) by magus.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1X408F-0001eE-PU for pgsql-odbc@postgresql.org; Mon, 07 Jul 2014 04:02:28 +0000 Received: (qmail 845 invoked by uid 512); 7 Jul 2014 04:02:18 -0000 Received: from unknown (HELO ?127.0.0.1?) (100.126.1.62) by sd2.tpf-fw-c.co.jp with SMTP; 7 Jul 2014 04:02:18 -0000 Message-ID: <53BA1BCA.5070605@tpf.co.jp> Date: Mon, 07 Jul 2014 13:02:18 +0900 From: "Inoue, Hiroshi" User-Agent: Mozilla/5.0 (Windows NT 6.1; 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> <53B7448A.2070707@tpf.co.jp> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -2.6 (--) 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/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" >>> >>> 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