DBSTATUS_E_UNAVAILABLE
- From: "Egbert Nierop" <egbert_nierop@xxxxxxxxxxxxxx>
- Date: Wed, 21 Jan 2009 00:11:31 +0100
I have a server side cursor connection using the native SQL Client.
One of the columns, is type DBTYPE_IUNKNOWN
The fetch of data just works. But the update fails.
HR=0x80040e21
..SetData(0) GuidSTatus 15, m_dwStateBlobStatus 8 mZlenStatus 8,
This is the SQL
(I leave out unrelevant t-sql)
SELECT GUID,
LastUpdated,
tblSessions_ISP.zLen,
tblSessions_ISP.State
The
accessor looks like this...
(the ordinal is OK!)
BLOB_ENTRY_LENGTH_STATUS(8, IID_ISequentialStream, STGM_READ, m_pStream, m_blobLength, m_dwStateBlobStatus)
Of course, I make sure the stream pointer IS empty.
Just before SetData(); I set the interface.
pSeqStream->QueryInterface(IID_ISequentialStream, (void**)&pgetSession.m_pStream);
Note, the interface has been tested and works in other situations.
QUESTION:
Why the error
Is a server-side cursor non-supported in combination with DBTYPE_IUNKNOWN?
CDBPropSet propset(DBPROPSET_ROWSET);
propset.AddProperty(DBPROP_ISequentialStream, true);
propset.AddProperty(DBPROP_COMMANDTIMEOUT, (LONG)30);
propset.AddProperty(DBPROP_ACCESSORDER, (LONG)DBPROPVAL_AO_SEQUENTIALSTORAGEOBJECTS);
if (isServerCursor)
{
propset.AddProperty(DBPROP_IRowsetChange, true);
propset.AddProperty(DBPROP_OTHERUPDATEDELETE, true);
propset.AddProperty(DBPROP_OWNUPDATEDELETE, true);
propset.AddProperty(DBPROP_UPDATABILITY, (LONG) DBPROPVAL_UP_CHANGE | DBPROPVAL_UP_DELETE);
propset.AddProperty(DBPROP_SERVERCURSOR, true);
propset.AddProperty(DBPROP_LOCKMODE, (LONG)DBPROPVAL_LM_SINGLEROW);
}
.
- Prev by Date: RE: Write Excel File with Two DataTables
- Next by Date: ADODB and Custom OLEDB Errors Collection
- Previous by thread: Write Excel File with Two DataTables
- Next by thread: ADODB and Custom OLEDB Errors Collection
- Index(es):