Problems with Insert Command in OLEDB.
Posted on 2000-03-19
I am learning OLEDB. I use the MS JET as my engine. I can do SetData to edit values. This work both with or without delayed mode.
But when I try to practise Insert. I found that it works with DIRECT insert but not in Delayed change (i.e. Insert then Upodate).
I set Update property to false (or not setting the property )
I set up some data for the row insertion
I use table.Insert(0), it worked!
but when I
set Update property to true
everything else the same.
then I use
table.Insert(0), there is no error
table.Update(0). there is an error of hr = 0x80040eda
(that is 'Error has occured', I am not able to decipher the actual error! Including using CError for m_spRowset and IID_RowsetUpdate, using the example in DBViewer.cpp)
Can anybody tell me why this happens, and how do I correct it?