Re: IRowsetChange::SetData()
- From: Alex Evans <AlexEvans@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 19 Apr 2007 22:50:03 -0700
Hi Marius
In all casees the hr is equal to S_OK, so it looks like working - BUT it
does NOT save the data, no error shows up. It seems something to do with the
hAccessor that MUST be released - BEFORE I try saving the new data???
So, I have done it, and my data is saving (I am just using an Execute
commenat with Update Table Set column='whatever' and tha tworks, but the same
openrowset fails if I am trying to do a loop and scroll between the rows
retrieved...
The call to iPRowset->ReleaseData() Fails, if I have a "Photo" / Image type
column in my recordset - as per the NorthWind sample from Microsoft...
In that sample - the following happens
In the Northwind sample – using C++ / OLED DB, in the function
HRESULT Employees::PopulateEmployeeNameList()
At the end of this function the following call fails, and I need some help
to understand why?
// Release the rowset.
hr = pIRowset->ReleaseRows(1, prghRows, NULL, NULL, NULL);
if(FAILED(hr))
goto Exit;
This call is mandatory for a GetData in a loop, so it can’t be ignored…
Hope someone can help me.
Thanks
Alex
"Marius Prisecaru" wrote:
Hi,.
"Alex Evans" <Alex Evans@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:C5E39410-0EC2-4B29-B36A-242DC15AF4BD@xxxxxxxxxxxxxxxx
Using C++ with OLE DB, with IRowsetChange->SetData() - it seems at times,
the
function works OK, and I can see the changed data in the table, in other
times I can't
I read about immediate Updates or deferred updates, but I thought if I am
using the IRowsetChange. it is an IMMEDIATE update or is it not so?
I can't seem to see any consistency or otherwise between the times that my
function works, to the cases when it seems to not change the data in the
record.
When your function does not change the record, does the call to SetData
succeed? If not, what is the error code returned?
Marius
- Follow-Ups:
- Re: IRowsetChange::SetData()
- From: Marius Prisecaru
- Re: IRowsetChange::SetData()
- References:
- Re: IRowsetChange::SetData()
- From: Marius Prisecaru
- Re: IRowsetChange::SetData()
- Prev by Date: Re: Update from SQL 2000 to SQL 2005 SP1 Express
- Next by Date: Re: IRowsetChange::SetData()
- Previous by thread: Re: IRowsetChange::SetData()
- Next by thread: Re: IRowsetChange::SetData()
- Index(es):
Loading