Re: Adding long text to a text field generates an error - Mailing list pgsql-odbc

From Andrew Ayers
Subject Re: Adding long text to a text field generates an error
Date
Msg-id 400C2913.7060901@eldocomp.com
Whole thread Raw
In response to Adding long text to a text field generates an error  (Ben Ramsey <br@benandliz.com>)
List pgsql-odbc
Ben Ramsey wrote:
> Microsoft OLE DB Provider for ODBC Drivers error '80040e21'
> Multiple-step OLE DB operation generated errors. Check each OLE DB
> status value, if available. No work was done.
>
> This error doesn't mean  much to me.  I've spent a month researching it

Google on "Multiple-step OLE DB operation generated errors" - you will
get a ton of hits on this. From what I remember, there are Windows API
calls to enumerate through the error(s) that were generated. If you can
do this, sometimes it might shed some light on what the problem is.

Also - google on "80040e21" (the error number - perhaps also the longint
version, as well) - from what I have googled, this error seems to be
because you are trying to insert more data than the field size will hold
(?), as you note...

> I've double-checked to make sure the column is of datatype "text" and
> not anything else.  It is.  So, it should accept unlimited text, right?

This is what is bizarre - yeah, it should hold "unlimited" (actually, I
think the limit is 2 gig). Now, you noted in a later email the settings
in your driver setup. This might be the issue - play around with it. Set
it to a higher number, and try inserting that much, then more - and see
if when the error occurs changes. If so, then you know that is it. You
might also uncheck the "treat as longvarchar", see if that helps. If you
have to have this checked, and setting the number to something larger
helps - then set it to a *very* large number, something you would never hit.

What is really perplexing me is that I have a VB app that uses such
fields, and I left the driver settings as is, and I haven't run into any
problems (and this app does have data in these fields in excess of 8190
bytes).

Hope something of this helps...

Andrew Ayers
Phoenix, Arizona

-- CONFIDENTIALITY NOTICE --

This message is intended for the sole use of the individual and entity to whom it is addressed, and may contain
informationthat is privileged, confidential and exempt from disclosure under applicable law. If you are not the
intendedaddressee, nor authorized to receive for the intended addressee, you are hereby notified that you may not use,
copy,disclose or distribute to anyone the message or any information contained in the message. If you have received
thismessage in error, please immediately advise the sender by reply email, and delete the message. Thank you. 

pgsql-odbc by date:

Previous
From: Ben Ramsey
Date:
Subject: Re: Adding long text to a text field generates an error
Next
From: Jeff Eckermann
Date:
Subject: Re: Adding long text to a text field generates an error