Jim Nasby <[EMAIL PROTECTED]> 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 [EMAIL PROTECTED] (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: [EMAIL PROTECTED]



---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

               http://archives.postgresql.org

Reply via email to