pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alanoly Andrews <alanolya@invera.com>
To: Adrian Klaver <adrian.klaver@aklaver.com>
To: Craig James <cjames@emolecules.com>
Cc: pgsql-admin@postgresql.org <pgsql-admin@postgresql.org>
Cc: pgsql-general@postgresql.org <pgsql-general@postgresql.org>
Subject: Re: [GENERAL] Re: Cannot retrieve images inserted through VB and odbc, after a table reorganization.
Date: Fri, 5 Sep 2014 15:33:14 +0000
Message-ID: <8dd4e9c35f6441b6b9d20b1eb659688e@Exch2.invera.com> (raw)
In-Reply-To: <5408CED2.10302@aklaver.com>
References: <6909b219ecae4d41b431efdaf6c953a3@Exch2.invera.com>
	<CAFwQ8rd0Abfm=0j4Oq5D0hcRPBn=D7A-HJzSPJmDk=EgDMA9zQ@mail.gmail.com>
	<a45db4656040438eaf2034a8f5870b8d@Exch2.invera.com>
	<5407679B.2030906@aklaver.com>
	<aafcb3551e2c4dddb696ec4a6d6087e8@Exch2.invera.com>
	<54086B77.9090102@aklaver.com>
	<af0397c0ba2f4fefb79c0ba63a5ab50d@Exch2.invera.com>
	<5408CED2.10302@aklaver.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-admin>

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?


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)

-----Original Message-----
From: Adrian Klaver [mailto:adrian.klaver@aklaver.com]
Sent: Thursday, September 04, 2014 4:43 PM
To: Alanoly Andrews; '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.

On 09/04/2014 08:03 AM, Alanoly Andrews wrote:
> Thanks, Adrian for the response.
>
> Yes, we are using the "large object" as per the specifications in the
> special "lo" module that we installed on the backend server. The table
> is created using the "lo" datatype for the image field and the table
> is being regularly used for insertions and retrievals using utilities
> other than ones using odbc. The odbc connection, too, works well on
> the table, as long as the table data is not reorganized after insertion(s).
>
> Here are three pages of our postgres odbc driver settings. Sorry, they
> are screen captures,  not plain text!

Hmm, to me at least nothing seems out of place. Though to be honest I am not sure what 'Bytea as LO' does in this situation.

Are you actually trying to store any large objects in bytea columns?

I searched on the error message you originally posted, but is fairly generic and covers a lot of different error sources.

So, is there any more specific error information in either the Postgres or ODBC logs?

>
> Alanoly.


--
Adrian Klaver
adrian.klaver@aklaver.com

________________________________

If you no longer wish to receive any of our emails, click on UNSUBSCRIBE.<mailto:unsubscribe@invera.com?subject=***Unsubscribe***> This e-mail may be privileged and/or confidential, and the sender does not waive any related rights and obligations. Any distribution, use or copying of this e-mail or the information it contains by other than an intended recipient is unauthorized. If you received this e-mail in error, please advise me (by return e-mail or otherwise) immediately.

Si vous ne désirez plus recevoir de nos courriels, veuillez appuyer sur DÉSABONNEMENT.<mailto:unsubscribe@invera.com?subject=***Unsubscribe***> Ce courriel est confidentiel et protégé. L'expéditeur ne renonce pas aux droits et obligations qui s'y rapportent. Toute diffusion, utilisation ou copie de ce message ou des renseignements qu'il contient par une personne autre que le (les) destinataire(s) désigné(s) est interdite. Si vous recevez ce courriel par erreur, veuillez m'en aviser immédiatement, par retour de courriel ou par un autre moyen.

-- 
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin


view thread (16+ messages)  latest in thread

Message-ID: <8dd4e9c35f6441b6b9d20b1eb659688e@Exch2.invera.com>
Permalink:  ../8dd4e9c35f6441b6b9d20b1eb659688e@Exch2.invera.com/
Also on:    postgresql.org/message-id/8dd4e9c35f6441b6b9d20b1eb659688e@Exch2.invera.com

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: alanolya@invera.com, adrian.klaver@aklaver.com, cjames@emolecules.com, pgsql-general@postgresql.org
  Subject: Re: [GENERAL] Re: Cannot retrieve images inserted through VB and odbc, after a table reorganization.
  In-Reply-To: <8dd4e9c35f6441b6b9d20b1eb659688e@Exch2.invera.com>

* 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