Forums » .NET » ASP.NET »

How to retreive the value of last identity has been updated in a database (SQL Server)?


Posted Date: 27 Jun 2008      Posted By:: Radha     Member Level: Silver    Member Rank: 0     Points: 1   Responses: 3



How to retreive the value of last identity has been updated in a database (SQL Server)?
What are Satellite Assemblies? How you will create this? How will you get the different language strings




Responses

#256465    Author: R.M.Phani Kumar      Member Level: Gold      Member Rank: 1641     Date: 27/Jun/2008   Rating: 2 out of 52 out of 5     Points: 6

@@IDENTITY function can be used to obtain the last identity value that has been updated to the database
Satellite assemblies are used while developing multilingual sites.

we can set the different anguage settings by asp.net methods from system.globalization

we hav to set the Cultureinfo and CurrentCulture properties of the pade in the Pae_init

Examle :
By Default the browser will be "en-US"
if you want to set the page should be displayed in deutch then we hav touse de-DE for Arabic use ar-KW(Kuwait arabic) etc

Happy Coding



 
#257072    Author: www.DotNetVJ.com      Member Level: Gold      Member Rank: 29     Date: 28/Jun/2008   Rating: 2 out of 52 out of 5     Points: 6

Hi,

SELECT @@IDENTITY
This is everyone's favorite function, unchanged from earlier versions of SQL Server. It returns the last IDENTITY value produced on a connection, regardless of the table that produced the value, and regardless of the scope of the statement that produced the value.

SELECT IDENT_CURRENT('tablename')
This new function returns the last IDENTITY value produced in a table, regardless of the connection that created the value, and regardless of the scope of the statement that produced the value.

SELECT SCOPE_IDENTITY()
This new function returns the last IDENTITY value produced on a connection and by a statement in the same scope, regardless of the table that produced the value.


Thanks -- Vj
http://dotnetvj.blogspot.com

Thanks -- Vijaya Kadiyala
http://www.DotNetVJ.com
Microsoft MVP
Me & My Little Techie



 
#257073    Author: www.DotNetVJ.com      Member Level: Gold      Member Rank: 29     Date: 28/Jun/2008   Rating: 2 out of 52 out of 5     Points: 6

Hi,

SELECT @@IDENTITY
This is everyone's favorite function, unchanged from earlier versions of SQL Server. It returns the last IDENTITY value produced on a connection, regardless of the table that produced the value, and regardless of the scope of the statement that produced the value.

SELECT IDENT_CURRENT('tablename')
This new function returns the last IDENTITY value produced in a table, regardless of the connection that created the value, and regardless of the scope of the statement that produced the value.

SELECT SCOPE_IDENTITY()
This new function returns the last IDENTITY value produced on a connection and by a statement in the same scope, regardless of the table that produced the value.


Thanks -- Vj
http://dotnetvj.blogspot.com

Thanks -- Vijaya Kadiyala
http://www.DotNetVJ.com
Microsoft MVP
Me & My Little Techie






 
Post Reply

 This thread is locked for new responses. Please post your comments and questions as a separate thread.
If required, refer to the URL of this page in your new post.



Next : add textbox control to grid view programaticaland read data from text box programatically
Previous : How will u load dynamic assembly? How will create assemblies at run time?
Return to Discussion Forum
Post New Message
Category:

Related Messages
Active Members
TodayLast 7 Daysmore...

Awards & Gifts
Copyright © SpiderWorks Technologies Pvt Ltd., Kochi, India
2005 - 2012 All Rights Reserved.
.NET and other trademarks mentioned in this site belong to Microsoft and other respective trademark owners.
Articles, tutorials and all other content offered here is for educational purpose only.
We are not associated with Microsoft or its partners.