not to auto update while doing addnew 
Author Message
 not to auto update while doing addnew

can someone answer me this easy question?

i'm using ms access database with vb.
i have a set of records in the database, but when i move
from records to records, it will automatically updates the
fields in the database if there are changes made. for the
addnew method call, it also does the auto update. now,
how can i avoid the auto update from happening?

ray



Sun, 07 Dec 2003 12:07:31 GMT  
 not to auto update while doing addnew
Ray,

How about using the BatchUpdate and the client cursor location?

Does this help?

Peter



Mon, 08 Dec 2003 13:54:31 GMT  
 not to auto update while doing addnew
On Wed, 20 Jun 2001 04:07:31 GMT, "Ray Cheng"

Quote:

>can someone answer me this easy question?

>i'm using ms access database with vb.
>i have a set of records in the database, but when i move
>from records to records, it will automatically updates the
>fields in the database if there are changes made. for the
>addnew method call, it also does the auto update. now,
>how can i avoid the auto update from happening?

>ray

Are you using ADO or DAO?  All the information really helps.

If you are using ADO, you can dimension your recordset as follows

Dim Withevents rs as ADODB.recordset

rather then

DIm rs as ADODB.Recordset.

You can now place code in the WillMove event of the recordset, and if
you do not want to keep changes to fields, execute the CancelUpdate
method. See the vb help for Recordset Properties.

If you are using a datacontrol instaed of a recordset, the solution is
similar.  Use the datacontrol's events to cancel updates before the
move.

Richard.



Mon, 08 Dec 2003 16:34:39 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Counter Fields - value assigned on Addnew not Update?

2. Update does not stick, AddNew won't add

3. Addnew and update method in ADOCE not working ?

4. Deleted recordd do not updated to the DB when reconnecting and doing updatebatch

5. Not having date auto updated - Help !

6. What is AddNew method doing

7. auto uninstall ? can it be done

8. Auto-Done configured but transaction commited.

9. DAO - AddNew/Update

10. Porting AC'97 .addnew and .update for compatibility w/SQL 7

11. Update or CancelUpdate without Edit or AddNew

12. ado.net - addnew, edit, update, delete

 

 
Powered by phpBB® Forum Software