how to generate a employee code in textbox automatically while in run time in web application.......when i run the page it will check the employee code in the database and it automatically shows the next value in the textbox how?
create following stored procedure,
create procedure GetNextIdAsbegindeclare @empcode varchar(100) select top 1 @empcode = 'eoo'+ CAST(SUBSTRING(ecode,4,LEN(ecode))+1 as varchar(100)) from @emp1 order by ecode desc select @empcodeend
And to call this storeprocedure from code refer :
http://aspsnippets.com/Articles/Getting-ID-of-the-newly-inserted-record-in-SQL-Server-Database-using-ADO.Net.aspx
© COPYRIGHT 2025 ASPSnippets.com ALL RIGHTS RESERVED.