|
-
Aug 23rd, 2000, 01:30 AM
#1
Thread Starter
New Member
I know I shouldn't duplicate the primary keys, but I still need to duplicate a record, then edit one or two fields (the record contains about 150 fields). Right now I'm using the .Addnew method, and then I have to give each field a value one by one ! This gets a bit tedious, there must be an easier way !
-
Aug 23rd, 2000, 10:38 AM
#2
Fanatic Member
Updating the database
Hi,
You could try using the clone method this will copy the original data, then change the individual field elements before saving. The other method that you may also find useful is the BatchUpdate method if you want to post records back after making changes to more than one record.
-
Aug 25th, 2000, 05:07 AM
#3
Thread Starter
New Member
Yeah !!
Hey Bill, thanx for the response. I'm using the .Clone method at the moment to duplicate the records, the best I can do looks something like this :
With AdoDataBurr.Recordset
Set AdoTemp.Recordset = .Clone
AdoTemp.Recordset.AbsolutePosition = .AbsolutePosition
.AddNew
!Sched = AdoTemp.Recordset!Sched
!InCID AdoTemp.Recordset!InCID
etc,
etc,
etc
.Update
End With
Is there a better way?
The other problem is how to insert a record into another table. The older drivers you could say something like:
DiskDB.Execute ("Insert into Table1 Select * from Table2")
How to I do this with ADO controls?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|