AddNew Method 
Author Message
 AddNew Method

Okay heres my question and who ever would be kind enough to answer it I would
like to Thank them In advance.I guess this question is kind of bordering between
a VB general discussion Question and an ADO Database Question. I am working with
ADO, in particular the Addnew method.Let me try to step through my code. Of
course initially I retrieve a set of records using a select statement and then
bind this data to the fields on a form.This Form is used as a utility form to
allow the user to Add Edit and Delete record.When I use the addnew method it
cleared the data from my resultset that I assigned to a Form Level Variant
variable. My problem is I need to use this data to do some validation checks i.e.
if the user fails to enter data for a particular field on the Form  I want to be
able to  save what was in the Record prior to executing the Addnew method.I hope
someone is understanding ME, anyhow what is the current programming method for
saving the current record's data prior to executing the addnew method?

Thank's
Ron Rex



Mon, 13 Oct 2003 06:02:50 GMT  
 AddNew Method
Okay heres my question and who ever would be kind enough to answer it I would
like to Thank them In advance.I guess this question is kind of bordering between
a VB general discussion Question and an ADO Database Question. I am working with
ADO, in particular the Addnew method.Let me try to step through my code. Of
course initially I retrieve a set of records using a select statement and then
bind this data to the fields on a form.This Form is used as a utility form to
allow the user to Add Edit and Delete record.When I use the addnew method it
cleared the data from my resultset that I assigned to a Form Level Variant
variable. My problem is I need to use this data to do some validation checks i.e.
if the user fails to enter data for a particular field on the Form  I want to be
able to  save what was in the Record prior to executing the Addnew method.I hope
someone is understanding ME, anyhow what is the current programming method for
saving the current record's data prior to executing the addnew method?

Thank's
Ron Rex



Mon, 13 Oct 2003 06:02:18 GMT  
 AddNew Method
Before adding your new record, save a pointer into a variant variable using
the Recordset.Bookmark property.

    dim bmk as variant
    bmk = rs.Bookmark

If there's a reason to cancel the AddNew, go back to the prior record with

    rs.Bookmark = bmk

If you get an error about the Bookmark property, you may need to adjust
CursorLocation/CursorType to a pair that support bookmarks... I'd recommend
adUseClient/adOpenStatic.



Mon, 13 Oct 2003 08:31:44 GMT  
 AddNew Method


Fri, 19 Jun 1992 00:00:00 GMT  
 AddNew Method

I save some data with the save method on a disk from a database.
I need to load these data and to put it in a table in another database.

I could load the file in a disconnected recordset and then copying the
record
in the table in the new database one by one, using the AddNew method,
but this is too slow for me.

In order to improve the performace of the routine, I need to INSERT
all the data at the same time from the recordset in memory to the table.

I'm using both Access and SQL Server.

Can someone help me ?

Thanks,
    Wladimiro



Mon, 13 Oct 2003 15:17:31 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. AddNew method

2. Returning PK values of record added by .AddNew method

3. AddNew method

4. AddNew Method overwrites existing records??

5. AddNew Method...

6. Help Please... AddNew Method error

7. Recordsets and AddNew method

8. AddNew Method

9. AddNew Method or better way?

10. Addnew() method question?????

11. addnew method and PubID field being set to null

12. AddNew method does not work

 

 
Powered by phpBB® Forum Software