Confusion with ADDNEW, EDIT, UPDATE 
Author Message
 Confusion with ADDNEW, EDIT, UPDATE

I'm still a novice with the database stuff.
I seem to be able to make ADDNEW, EDIT, UPDATE and FINDFIRST work as
expected most of the time. The difficulty is when there are no records
in the db.
1. An UPDATE after an ADDNEW fails with "No Current Record". I assume
that is because UPDATE tries to reposition at the previous current
record and there was none. Am I right? If so how do I get around this?

2. FINDFIRST does not seem to set the NOMATCH when the db is empty but
it does when there are records. Wierd. Ideas?

3. Also, I seem to have CLICK events firing for bound controls at
start up. I end up with errors because there is no data in the field
because the db is empty.  Any clue what this is all about?

None of this seems to be a problem when there are records.
Any help would be greatly appreciated.

                                Paul Briggs
                                University of Guelph



Tue, 05 May 1998 03:00:00 GMT  
 Confusion with ADDNEW, EDIT, UPDATE


Quote:
>I'm still a novice with the database stuff.
>I seem to be able to make ADDNEW, EDIT, UPDATE and FINDFIRST work as
>expected most of the time. The difficulty is when there are no records
>in the db.
>1. An UPDATE after an ADDNEW fails with "No Current Record". I assume
>that is because UPDATE tries to reposition at the previous current
>record and there was none. Am I right? If so how do I get around this?

I think I had a similar problem and got round it by doing an EDIT
immediately following the ADDNEW, then doing the UPDATE after I'd set
the data for the new record.

Randolph

-------------------------------------------------------------------
Adastra Software Limited, The Tramway Stables, Rampart Road,
Hythe, Kent CT21 5BG, United Kingdom
Tel: +44 1303 264803 Fax: +44 1303 261644
-------------------------------------------------------------------



Tue, 05 May 1998 03:00:00 GMT  
 Confusion with ADDNEW, EDIT, UPDATE
It might be worth checking the details of the fields in your Access
database. Are there any fields which definitely require data entry? I
have had similar problems and got round using the EDIT method.


Fri, 08 May 1998 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Update or CancelUpdate without Edit or AddNew

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

3. how i can use the dbgrid with database {edit ,addnew,update or delete the data}

4. Help with DAO AddNew / Edit And Update in VB 4

5. .Undo, .Edit, .Update, .AddNew Inconsistencies - freaking out!

6. Addnew & Delete Confusion

7. Updating Links in Word 2002, Edit, Links, Select Update Method

8. Update confusion

9. ADo ADD New and Update also Edit Update

10. VB update my mdb file without .addnew or .edit and .update!!!

11. trouble rs.edit and rs.addnew and cursors

12. Delete, Edit OK. AddNew=Error 524: Driver Not Capable

 

 
Powered by phpBB® Forum Software