CodeCharge Studio
search Register Login  

Visual Web Reporting

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

YesSoftware Forums -> CodeCharge Studio -> General/Other

 After I do an Insert, how I I retreive the ID I just created?

Print topic Send  topic

Author Message
Paolo Valladolid
Posted: 05/17/2004, 5:35 PM

I am inserting a row into a table that generates a new sequence number (let's say - EmployeeID). How are other users getting that new EmployeeID? Are you guys just selecting it using the firstname and lastname of the employee?

The DB I am using is SQL Server if that helps. And the Project Language is ASP 3.0 W/ Tempates
peterr


Posts: 5971
Posted: 05/17/2004, 6:14 PM

The SQL Server has the "@@IDENTITY" feature that allows to retrieve the last insterted key (autonumeric field).
Please see the related topic at http://forums.codecharge.com/posts.php?post_id=46776
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message
David Harrison
Posted: 05/17/2004, 7:37 PM

Actually while your at it look at Scope_Identity() this will return the
identity field even if you have triggers that create new entries.

David Harrison

"peterr" <peterr@forum.codecharge> wrote in message
news:240a963732f1bb@news.codecharge.com...
> The SQL Server has the "@@IDENTITY" feature that allows to retrieve the
last
> insterted key (autonumeric field).
> Please see the related topic at
> http://forums.codecharge.com/posts.php?post_id=46776
> _________________
> Peter R.
> YesSoftware Support Representative
> http://support.codecharge.com
> Warning: I use Google
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>


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.