CodeCharge Studio
search Register Login  

Web Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> ASP

 Duplicating a record

Print topic Send  topic

Author Message
afrausto

Posts: 66
Posted: 08/11/2004, 2:35 PM

Can someone please tell me how to duplicate a record? For instance I have a record grid listing applications. I would like to be able to duplicate an application record so that I don't have re-enter the same information over again.

I'm using CCS, ASP 3.0, and MS Access.

Thanks,
Albert
View profile  Send private message
Alexandre Finger
Posted: 10/21/2004, 11:16 AM

Here is a complete snippet of code that works for ASP, and access.

You create a new button at the same place than the "add" and "Modifiy" buttons and you add custom code on the "on click" event.

Just paste the code
' members is the name of your form

Members.InsertRow

Dim rs
Set rs = Members.Datasource.Connection.Execute("SELECT @@IDENTITY")

' memberid is the database autonumber id of the access table
Redirect = ccRemoveParam(Redirect, "memberid") & "memberid=" & rs.fields(0)
set rs = nothing
' -------------------------

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.