Re: Cannot add new to a empty table by using IADORecordBinding interfa



It I manually add one record, then Add new is OK. Please help!!

I can help. But...

I don't see any code posted you. Nor version of MDAC installed.
How are we supposed to help given that? Before you think of posting, have a
look at your post and ask yourself, "Is there anything that I could add that
would help others to help me?". Code does help - without we are not likely
to guess if you have made some coding error.

The chances are you are using status variables and you forgot to set them to
adFldOk between calling pInterface->AddNew() and
pInterface->Update(). Also it helps if all your member variables are
equivalent to 0 in the constructor of the derived class from
IADORecordBinding. I found a bug some time ago with MDAC 2.5+ on this, never
clarified by Microsoft.

Thanks

Stephen Howe


.



Relevant Pages

  • Re: Function Returning a local object???
    ... because I can imagine the return value of foo() ... > derived class class whose member variables are themselves class ... > objects or worse still objectsof a derived class, ... the constructor, destructor and copy constructor if you don't defined ...
    (comp.lang.cpp)
  • Re: Rules for constructors
    ... Alex Hunsley wrote: ... > constructor for A, the initialisation of the member variables in class B ... realising of GUI items from a constructor. ...
    (comp.lang.java.programmer)
  • Re: Deriving from vector
    ... Now I use member variables for this sort of thing, ... (Did you know that a derived class can ... complicated when one class template derives from another. ... say fin the derived class to call a base class member function f. ...
    (microsoft.public.vc.stl)
  • Rules for constructors
    ... This is because the constructor of B calls super, and by ... the initialisation of the member variables in class B ... (or else they will be overridden causing chaos as I have experienced ... overridden methods should not access member variables that are ...
    (comp.lang.java.programmer)
  • Re: Help with the, "this" initializer in a constructor.
    ... > each constructor has a different signature. ... > Say I have these two classes one a base class the other a derived one. ... > BUT what I don't know how to do is make sure that the derived class, ... If be mean by "ONLY" tp prevent calling a base class constructor, ...
    (microsoft.public.dotnet.languages.csharp)