Re: IRowsetChange::SetData()



Hello again,

I my previous answer, I forgot to say that the error I get is

-2147418113 {E_UNEXPECTED} HRESULT

I wish I could find a working sample of using ATL, without any UI.. jus tthe
plain basic GetData /SetData, Seek, MoveNext etc...

I am working with VS 2005 (It was all easy with ADO in the days I used eVC3,
but ADO is no longer available under VS 2005) and using Windows Mobile 5 on
the device

Articles about using Tempolates all seem to relate to eVC3 / 4 ...

Any suggestions?

Cheers
Alex

"Marius Prisecaru" wrote:

OK, looking over your post I think I can pretty much rule out any use of
Templates... it looks like you are using pure OLEDB. Therefore, if that is
the case, you can ignore the FreeRecordMemory comment. However, it is still
important to find out the error code you get back from ReleaseRows or if you
haven't already done so, look over this document:
http://msdn2.microsoft.com/en-us/library/ms719771.aspx

Marius


"Marius Prisecaru" <prisasm@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote
in message news:%23cCHsj1gHHA.4320@xxxxxxxxxxxxxxxxxxxxxxx
Hi,

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.

Have you tried freeing the columns before attempting to Release the rows?
I don't know if you use OLEDB w/ Templates or not, and I don't have the
example in front of me so this is really a long shot but check out
"FreeRecordMemory" and see if that could be of any help to you. What error
code do you get from ReleaseRows?

Here is some code from ATL for "MoveNext"; I assume you want to use same
type of code in your loop:

/../
m_pAccessor->FreeRecordMemory(m_spRowset);
ReleaseRows(); // My comment here: implemented as /../
m_spRowset->ReleaseRows(1, &m_hRow, NULL, NULL, NULL); /../

/../

Marius





.



Relevant Pages

  • Re: IRowsetChange::SetData()
    ... I recommend reading the articles by João Paulo Figueira on ATL OLEDB ... Server CE/Mobile and ATL w/ OLEDB. ... then try to release it before calling ReleaseRows? ...
    (microsoft.public.sqlserver.ce)
  • Re: IRowsetChange::SetData()
    ... CP because some things that were missing in ATL 3/4 are present in ATL 8. ... Following Joao's suggestions in these articles, it seemed I have to make ... Server CE/Mobile and ATL w/ OLEDB. ... then try to release it before calling ReleaseRows? ...
    (microsoft.public.sqlserver.ce)
  • Re: IRowsetChange::SetData()
    ... ATL, I will appreciate it. ... "Marius Prisecaru" wrote: ... Server CE/Mobile and ATL w/ OLEDB. ... then try to release it before calling ReleaseRows? ...
    (microsoft.public.sqlserver.ce)

Loading