Hii,
I want to create auto incremented hr_id I have fetch Max(hr_id)
but how to incease numeric portion in C# code.
Please Tell Me.
The MAX(HR_ID) is COMP/MY/101
when I do entry in table automatically it be
COMP/MY/102
for other COMP/MY/103 and so on...


Amit GuptaRank #190 · 12.8K reputationPosted Mar 22, 2017, 2:13 AM EDT
Rajeev PunhaniRank #551 · 4.4K reputationPosted Mar 22, 2017, 2:14 AM EDT
Hi Vandana,
Amit GuptaRank #190 · 12.8K reputationPosted Mar 22, 2017, 1:41 AM EDT
VandanaRank #4,422 · 344 reputationPosted Mar 22, 2017, 1:59 AM EDT
Source Error:
Line 17: var id = "COMP/MY/101"; //assuming it is fetched from database with max (hr_id); Line 18: Line 19: var IdPart = id.SubString(id.LastIndexOf("/") + 1); Line 20: var stringPart = id.Replace(IdPart); Line 21: