pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: stejsky@volny.cz
To: pgsql-bugs@postgresql.org
Subject: BUG #13124: OLEDB insert/update on rowset
Date: Wed, 22 Apr 2015 12:20:45 +0000
Message-ID: <20150422122045.553.97371@wrigleys.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

The following bug has been logged on the website:

Bug reference:      13124
Logged by:          Petr Stejskal
Email address:      stejsky@volny.cz
PostgreSQL version: 9.4.1
Operating system:   Windows Vista
Description:        

Hello, 
does the Postgresql oledb driver support Insert/Update operation?
I get the error E_NOINTERFACE (0x80004002) on Insert function.

see the code:

  CoInitialize(NULL);
	CDataSource db;
	CSession session;
	CDBPropSet	dbinit(DBPROPSET_DBINIT);

  dbinit.AddProperty(DBPROP_AUTH_INTEGRATED, "SSPI");
	dbinit.AddProperty(DBPROP_AUTH_PERSIST_SENSITIVE_AUTHINFO, false);
  dbinit.AddProperty(DBPROP_AUTH_USERID, "myuser");
  dbinit.AddProperty(DBPROP_AUTH_PASSWORD, "pass");
	dbinit.AddProperty(DBPROP_INIT_CATALOG,  "mydatabase");
	dbinit.AddProperty(DBPROP_INIT_DATASOURCE, "127.0.0.1");
	dbinit.AddProperty(DBPROP_INIT_LCID, (long)1029);
	dbinit.AddProperty(DBPROP_INIT_PROMPT, (short)4);
	hr = db.OpenWithServiceComponents("PostgreSQL.1", &dbinit);
	hr = session.Open(db);

  CDBPropSet propsetI(DBPROPSET_ROWSET);
	propsetI.AddProperty(DBPROP_IRowsetChange, true);
	propsetI.AddProperty(DBPROP_UPDATABILITY, DBPROPVAL_UP_CHANGE |
DBPROPVAL_UP_INSERT | DBPROPVAL_UP_DELETE);
  propsetI.AddProperty(DBPROP_CANFETCHBACKWARDS, true);

  {
    TRY_HRESULT(hr)
    CCommand<CAccessor<CTEvent> > t;
    hr = t.Open(session, "select * from abc", &propsetI);
    t.m_EVENT_ID = 123;
    t.m_idstatus = DBSTATUS_S_OK;
    hr = t.Insert();
    t.Close();
    CATCH_HRESULT(hr)
  }




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



Message-ID: <20150422122045.553.97371@wrigleys.postgresql.org>
Permalink:  ../20150422122045.553.97371@wrigleys.postgresql.org/
Also on:    postgresql.org/message-id/20150422122045.553.97371@wrigleys.postgresql.org

 · 

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-bugs@postgresql.org
  Cc: stejsky@volny.cz
  Subject: Re: BUG #13124: OLEDB insert/update on rowset
  In-Reply-To: <20150422122045.553.97371@wrigleys.postgresql.org>
  References: <20150422122045.553.97371@wrigleys.postgresql.org>

* 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