Finally I found the cause, neither the use of
MFC as a statically linked library nor
as shared as a DLL did the problem. The problem is in the function
pSet->GetMaxID()
which it's defenition is:
long CDbOdbcSet::GetMaxID()
{
if (IsBOF() && IsEOF())
return 0;
MoveLast();
return m_RefAdresse;
}
So I called the
pSet->AddNew();
then
MoveLast();
inside
pSet->GetMaxID();
function, so the
pSet->AddNew();
has no effect
(has gone) after the call of
MoveLast();
&
pSet->Update();
will throw an
exception ;)
Thanks for anybody who tried to help ;)