ADO RecordSet.Status value after AddNew is not adRecNew

In ADO I wanted to test if the current record  existing or has been added with AddNew.


I ‘ve checked RecordSet.Status value and expected that after AddNew command the Status will be adRecNew(1)  but it returned adRecOK(0).


Possibly the value depends on cursor settings , in my code I had adOpenKeyset, adLockOptimistic.


Fortunately I found that I can use EditMode and check if value is adEditAdd (2)

Advertisements