Counter Fields - value assigned on Addnew not Update? 
Author Message
 Counter Fields - value assigned on Addnew not Update?

VB4 Pro/32bit/Win95.

Can someone confirm the following:
When using a counter field the value is calculated
(and lost forever)
when the Addnew method is invoked -NOT- when
the Update method is invoked (contrary to what is
stated in the help files ).

For example, say you have 3 records in a table
and you do the following:

Begintrans
        table.addnew
                table.field="something"
                Rollback        }include these to force
                exit sub        }exit/simulate error
        table.update
Committrans

Then, remove the 2 lines (Rollback & exit sub) and repeat.
The next record has a value in the counter field of 5,
not 4 as I would expect!!

Any comments?
--
frank bainbridge
eds ltd



Mon, 18 Oct 1999 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Access counter field value during AddNew

2. Access counter field value during AddNew

3. How do I gett the value of autoincrement field after an .AddNew/.Update

4. Getting the counter value after an addnew-SQL SERVER 2000/ADO

5. Q:Newly assigned counter value

6. Help resetting counter field value?

7. updating the counter field in access2.0

8. text box as counter window not updating until end of load

9. AddNew/Update command & field searches

10. How to get a field value after and AddNew command SQL 7.0 and VB 6

11. Using Variables for Field Names using .AddNew and .Update

12. Null value in AUTONUMBER field after MyRS.RECSET.AddNew

 

 
Powered by phpBB® Forum Software