recordset copy help

unforgiven_s23
04-18-2004, 06:31 AM
hello

i have a database ....which has a lot of fields including a field called "ID" which is set to autonumber with no duplicates ...

now what i want to do is to copy the data in all the fields of the current recordset and add a new recordset & paste the copied data into the respective fields

please help

thanks in advance

Shurik12
04-18-2004, 09:41 AM
Hi,

If I understand you correctly the .Clone method of the recordset object might be of help.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/ado270/htm/mdmthclone.asp

Shurik.

MKoslof
04-19-2004, 07:02 AM
Or, if you simply want to take a table and stuff it into a new, non-existing table, looking into the "SELECT * INTO" sql method.

There are numerous other methods you could implement as well....let us know if the two methods provided aren't satisfactory

unforgiven_s23
04-19-2004, 12:44 PM
thanks for ur ideas ....... but i don't think the clone method is of use to me

let me explain my problem .....

first a user starts a new form .......fills out the data and then saves it .... while saving the data is stored in a database as well as in a .rtf file

now if the user wants to open it again ....he opens the .rtf file ....... then in the code i search for the ID number then set the recordset to the record corrosponding to the ID number ..........

now what i want to do is.... to provide a kind of "save as" option during which all the data gets copied into a new record and then is saved ........(i.e with a different ID number )

..... does anyone have any idea as how to do it.......

thanks in advance

MKoslof
04-19-2004, 12:47 PM
There is no "save as" method for databases :). You are going to have to do one of two things:

1) AddNew: find the record and then create a new one based on your search condition
2) Update: find the record and then re-assign a new ID number or change the current data

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum