Re: OLEDB errors when updating rows (that contain BLO B columns) using dynamic accessor
Orest Kulik <[email protected]> Wed, 3 Jul 2002 00:05:19 -0700
| Newsgroups | gmane.comp.windows.devel.oledb.devel |
|---|---|
| Message-ID | <OLEDB_DEV%[email protected]> |
Hi Mark, Yes, I am trying to leave the BLOB column unchanged during the SetData call (e.g. I decided I want to change only some non BLOB data). I have come up with the following pattern: 1. In BindColumns override (CDynamicAccessor) after binding I would set DBSTATUS_S_IGNORE on all BLOB columns. 2. If I would then change some BLOB data, I'd set that column's status to DBSTATUS_S_OK. 3. I wouldn't NULL all stream ptrs that I haven't used, because of the ignore status set shortly after the binding, provider would not free them after SetData (and that accessor freeing Release would work). Unfortunately, DBSTATUS_S_IGNORE does not work for me. I always get that E_UNEXPECTED (0x8000ffff) after calling SetData (although I have previously explicitly set BLOB column status to ignore). Well, my conclusion in a chronically time shortage, is following: 1. If I do not need BLOB column in my recordset, I will not include that column in my SELECT (that's pretty obvious). 2. If I however bind some BLOB columns with my SELECT, before updating/inserting, I would read/write that data stream (I would definitely take ownership of stream), if I have not previously touched it. It is costly but why did anyone bind BLOB if he/she did not need it in a first place? Orest Kulik Ekobit, HR You can read messages from the OLEDB_DEV archive, unsubscribe from OLEDB_DEV, or subscribe to other DevelopMentor lists at http://discuss.develop.com.