Hello everyone,Now I meet a problem which is hard to handle. Is there anyone who had the experience, pls do me a favor.
It is descripted as below:I use OLEDB to connect a  mdb to do some operations of table. First I move to last entry. Then move prev.
But I alway get the return value of 0 after moving to the first entry. But in fact, the current entry is not moved. I don't know why it occurs.为什么移到第一个记录之后得到的都是0,为什么会停在那个记录不动?Thanks in advance.

解决方案 »

  1.   

    Hi, I have a problem with MSJET 4.0 OLEDB provider. In jet 3.5, the
    CRowset::MovePrev will return DB_S_ENDOFROWSET if it goes pass the
    first record as expeced .
    But when I use it in Msjet4.0 OLEDB, it always return S_OKHence loop like this will fail:while(hr != S_OK)
    {
        hr = rs.MovePrev();
    }as it will loop in a circle.When I tested it separately, like:
    MoveFirst the MovePrev,
    it returns S_OK, and the data is still the first record's
    if I MovePrev again, 
    it again returns S_OK, and the data in the accessor becomes the second
    last record.This does not happen with Jet 3.5
    Is this a bug of Jet 4.0 OLEDB???
    Can anybody explain to me.
    Or is there a get around of the problem?Thanks a million!!!