CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> Java

 Re: afterExecuteInsert Event

Print topic Send  topic

Author Message
Csaba
Posted: 02/16/2005, 1:12 PM

Hi All,

I'm new to Java and CCS. I'm trying to do the following: when the user submits a record, I'd like to create an additional record in a different table, to link the just created record to something else. For this, I would need to get the newly created PK value for the record.

Two questions:

It seems that this code should go to the afterExecuteInsert event. This event has one parameter, which is DataObjectEvent type. Where does one find the documentation for this? I couldn't find any reference to this in the CCS help.

Also, is it possible to get back the newly created PK through the DataObjectEvent object? I'm using MSSQL as the backend, so I'm hoping a SELECT @@identity will work, or if not, I could look up the MAX(PK) from the table in question (which sucks). However if this object already has that I'd like to use that.
peterr


Posts: 5971
Posted: 02/16/2005, 8:47 PM

There is an example of retrieving the last inserted record in the "Multi-Step User Registration" example in CCS Example Pack. This happens on this page: http://examples.codecharge.com/ExamplePack/MultiStepReg...gistration1.php

You can create a new project in CCS based on the above example and analyze how it works.
Otherwise our support may also be able to help you.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message

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.

PHP Reports

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

Home   |    Search   |    Members   |    Register   |    Login


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