BUG #13124: OLEDB insert/update on rowset

From: stejsky(at)volny(dot)cz
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #13124: OLEDB insert/update on rowset
Date: 2015-04-22 12:20:45
Message-ID: 20150422122045.553.97371@wrigleys.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

The following bug has been logged on the website:

Bug reference: 13124
Logged by: Petr Stejskal
Email address: stejsky(at)volny(dot)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)
}

Browse pgsql-bugs by date

  From Date Subject
Next Message stejsky 2015-04-22 12:38:24 BUG #13125: text bug
Previous Message Michael Paquier 2015-04-22 03:15:34 Re: Installton Error