This topic is locked

Copy function

9/10/2004 7:14:00 PM
ASPRunnerPro General questions
J
joost author

Hi,
What I would like to do: On the list page have an extra button on record level to copy the record selected. If a user hits that button the add page is opened with all the values of the record selected. If the user thenhits the save button a new record is created just as if he was in full add mode. Is this possible without major changes to the code?
Thanks,
Joost

C
Columbus 9/17/2004

Hi,
I have created a 'Clone' tag on the edit page to duplicate a row by SQL where all field values from a row specified by a given set of keyfields are copied to the new row except the values of keyfields (maximum number = 3) .
Just testing now.
BTW, don't know why the admin remove my last request regarding this subject.
Columbus

Sergey Kornilov admin 9/18/2004

I got Copy feature on my to do list however I cannot tell when exactly it will be implemented.

501077 12/22/2004

You can get a copy of an edit page and rename it (for example copy.asp), then modify the SQL "update" statement to "insert into" and remove "ID=.." at the end , also dont forget to change edit.asp in your form to copy.asp. On the list page create a link just like edit page link just change edit.asp to copy.asp in the code. Now when you click copy on list page it should bring copy.asp with all the fields populated just like edit page, once you click save new record (a copy of the record you selected) will be created in your database.

swat 3/28/2005

You can get a copy of an edit page and rename it (for example copy.asp), then modify the SQL "update" statement to "insert into" and remove "ID=.." at the end , also dont forget to change edit.asp in your form to copy.asp. On the list page create a link just like edit page link just change edit.asp to copy.asp in the code. Now when you click copy on list page it should bring copy.asp with all the fields populated just like edit page, once you click save new record (a copy of the record you selected) will be created in your database.


-2147217900

[Microsoft][ODBC Microsoft Access Driver] Syntax error in INSERT INTO statement.

/test/cio/edit/product_copy.asp [/b]
I could not get it work- where do you remove ID=... , I am getting ODBC error-

swat 4/6/2005

I got it COPY function to work- If anyone ask I will post it later -