Re: BUG #2555: runtime error 80040e21

From: Victor Snezhko <snezhko(at)indorsoft(dot)ru>
To: Jim Nasby <jnasby(at)pervasive(dot)com>
Cc: Jonas Bruhn <jonas(dot)bruhn(at)gmail(dot)com>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #2555: runtime error 80040e21
Date: 2006-08-09 09:16:39
Message-ID: uu04mnua0.fsf@indorsoft.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Jim Nasby <jnasby(at)pervasive(dot)com> writes:

>> I'm using VB6, and trying to update a table. It is all happening on
>> my home pc with IIS running too. I can download the table to a
>> datagrid, bit I can't type any text i a textbox and update it whith
>> out the error occuring. Here [skip]
> I don't know VB very well, but I'm guessing that you can't update a
> recordset that's the product of a SELECT. In any case, it's certainly
> not a PostgreSQL bug. If you need more help, try pgsql-general.

This is a limitation of the PostgreSQL OLE DB provider. At present,
the provider doesn't support updating. Most of the required
functionality (namely, support for parameterized queries that ADO
issues) is already committed, but ADO doesn't want to issue update
queries until the following patch is applied to the CVS version of
pgoledb:

RCS file: /cvsroot/oledb/oledb/TypeInfo.h,v
retrieving revision 1.20
diff -u -r1.20 TypeInfo.h
--- TypeInfo.h 20 Apr 2006 11:54:18 -0000 1.20
+++ TypeInfo.h 21 Apr 2006 10:50:52 -0000
@@ -148,7 +148,7 @@
colinfo->ulColumnSize=PQfsize( res, field_num );
if( colinfo->ulColumnSize<0 )
colinfo->ulColumnSize=~0;
- colinfo->dwFlags=DBCOLUMNFLAGS_MAYBENULL|
+ colinfo->dwFlags=DBCOLUMNFLAGS_MAYBENULL|DBCOLUMNFLAGS_WRITEUNKNOWN|
(colinfo->ulColumnSize==~0?0:DBCOLUMNFLAGS_ISFIXEDLENGTH);
colinfo->wType=DBTYPE_UDT; // User Defined Type
colinfo->bPrecision=~0;

Nobody on the oledb-devel(at)pgfoundry (dot) org list knows if this is
the right solution (actually, only I and Shachar Shemesh - the
committer of the project - participated in discussion about this)

Although, this patch makes updating work.

Feel free to discuss arising problems at oledb-devel@ list.

Known problems so far:
1) lack of bytea support
2) date/time types don't support updating
3) bool types are still handled incorrectly.

I have one big patch to solve them all. Most of the fixed have been
proposed at oledb-devel@, but not accepted due to the following:
1) to implement bytea support, we need to avoid the bug in ATL
2) I have implemented date/time uploading as text for now, and all
the other data types are passed in binary.
3) The fix is OK, but wasn't committed yet.

The patch is accessible here:

http://www.indorsoft.ru/oledb-current.diff

--
WBR, Victor V. Snezhko
E-mail: snezhko(at)indorsoft(dot)ru

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Pavel Golub 2006-08-09 11:48:24 BUG #2570: Connection closed unexpectedly
Previous Message Franz.Rasper 2006-08-09 08:10:07 corruption since 7.4.13 update ?