pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Inoue, Hiroshi <inoue@tpf.co.jp>
To: Alanoly Andrews <alanolya@invera.com>
To: 'pgsql-odbc@postgresql.org' <pgsql-odbc@postgresql.org>
Cc: Adrian Klaver <adrian.klaver@aklaver.com>
Subject: Re: FW: [GENERAL] Re: [ADMIN] Cannot retrieve images inserted through VB and odbc, after a table reorganization.
Date: Tue, 09 Sep 2014 08:54:58 +0900
Message-ID: <540E41D2.1080103@tpf.co.jp> (raw)
In-Reply-To: <2f7103a1a1ff4bd28ba0cd9d71f92c6e@exch1.invera.com>
References: <2f7103a1a1ff4bd28ba0cd9d71f92c6e@exch1.invera.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-odbc>

(2014/09/08 23:03), Alanoly Andrews wrote:
> Hello experts in postgres-odbc,
>
> The following was the latest in a series of posts that I had made to the admin and general discussion groups. This post contains an excerpt from the log produced by the postgres odbc client when an attempt was made to retrieve an image stored on a backend postgres database (AIX server). The postgres database is 9.1.4 version. The column containing the image is defined as type "lo". The SQL is a simple one of the type "select image from table where image_key=keyvalue". In the early part of the log all return codes are 0. When the return code is 1, we get the "The buffer was too small for the GetData" and "Error reading from large object" messages. Would any of you know what these messages mean and how we can get around the problem? The code for sql retrieval is written in VB code. It should be noted that the same image(s) are retrievable through non VB/ODBC applications.
>
> Feedback very much appreciated.
>
> Alanoly Andrews.
>
> -----Original Message-----
> From: Alanoly Andrews
> Sent: Friday, September 05, 2014 11:33 AM
> To: 'Adrian Klaver'; 'Craig James'
> Cc: pgsql-admin@postgresql.org; pgsql-general@postgresql.org
> Subject: RE: [GENERAL] Re: [ADMIN] Cannot retrieve images inserted through VB and odbc, after a table reorganization.
>
> Hi Adrian,
>
> 1. We are storing our large objects in a table column whose datatype is "lo" (which, I understand, ultimately is in fact "bytea").
> 2. The error messge returned to the VB is, yes, very generic. And the backend postgres server does not have any messages relevant to this issue.
> 3. We set the trace on in the odbc driver and got a large log file, from which I give below the part that I think is significant.

> It refers to the "buffer size being too small". Where, in the odc settings,  do we set the buffer size?

It isn't a problem.

> STELimageViewOn 834-fec          EXIT  SQLGetData  with return code 1 (SQL_SUCCESS_WITH_INFO)
>                                  HSTMT               0x002BFC70
>                                  UWORD                        2
>                                  SWORD                        1 <SQL_C_CHAR>
>                                  PTR                 0x0018EECF [       0] ""
>                                  SQLLEN                     0
>                                  SQLLEN *            0x0018EEA4 (6)
>
>                                  DIAG [01004] The buffer was too small for the GetData. (-2)
>
> STELimageViewOn 834-fec          ENTER SQLGetData
>                                  HSTMT               0x002BFC70
>                                  UWORD                        2
>                                  SWORD                       -2 <SQL_C_BINARY>
>                                  PTR                 <unknown type>
>                                  SQLLEN                     0
>                                  SQLLEN *            0x0018EE54
>
> STELimageViewOn 834-fec          EXIT  SQLGetData  with return code 1 (SQL_SUCCESS_WITH_INFO)
>                                  HSTMT               0x002BFC70
>                                  UWORD                        2
>                                  SWORD                       -2 <SQL_C_BINARY>
>                                  PTR                 <unknown type>
>                                  SQLLEN                     0
>                                  SQLLEN *            0x0018EE54 (46165)
>
>                                  DIAG [01004] The buffer was too small for the GetData. (-2)
>
> STELimageViewOn 834-fec          ENTER SQLGetData
>                                  HSTMT               0x002BFC70
>                                  UWORD                        2
>                                  SWORD                       -2 <SQL_C_BINARY>
>                                  PTR                 <unknown type>
>                                  SQLLEN                 32768
>                                  SQLLEN *            0x003CE284
>

> STELimageViewOn 834-fec          EXIT  SQLGetData  with return code -1 (SQL_ERROR)
>                                  HSTMT               0x002BFC70
>                                  UWORD                        2
>                                  SWORD                       -2 <SQL_C_BINARY>
>                                  PTR                 <unknown type>
>                                  SQLLEN                 32768
>                                  SQLLEN *            0x003CE284

>                                  DIAG [S1000] Error reading from large object. (1)

This is a problem.
Could you take Mylog output and send it to me?

regards,
Hiroshi Inoue

-- 
I am using the free version of SPAMfighter.
SPAMfighter has removed 12510 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 (5+ messages)  latest in thread

Message-ID: <540E41D2.1080103@tpf.co.jp>
Permalink:  ../540E41D2.1080103@tpf.co.jp/
Also on:    postgresql.org/message-id/540E41D2.1080103@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, alanolya@invera.com, adrian.klaver@aklaver.com
  Subject: Re: FW: [GENERAL] Re: [ADMIN] Cannot retrieve images inserted through VB and odbc, after a table reorganization.
  In-Reply-To: <540E41D2.1080103@tpf.co.jp>
  References: <2f7103a1a1ff4bd28ba0cd9d71f92c6e@exch1.invera.com> <540E41D2.1080103@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