Click here to Skip to main content
11,716,938 members (81,066 online)
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# ASP.NET SQL-Server
I want to increment the Registration Id as
S0001 so how can I do with auto increment....
pls suggest me
Posted 28-Sep-12 23:14pm
Edited 29-Sep-12 5:42am
v2
Comments
Zoltán Zörgő at 29-Sep-12 12:37pm
   
I would create add a .net integrated data type for the sql server, if this is acceptable in your environment. If you are interested in this path, I could guide you.

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Use a stored procedure instead of the INSERT statement.

An example is here: Auto-incremented ID with NVARCHAR/VARCHAR datatype[^]
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 659
1 F-ES Sitecore 260
2 Maciej Los 185
3 OriginalGriff 175
4 Richard MacCutchan 140
0 Sergey Alexandrovich Kryukov 1,029
1 Maciej Los 464
2 Richard MacCutchan 430
3 CHill60 415
4 OriginalGriff 415


Advertise | Privacy | Mobile
Web01 | 2.8.150901.1 | Last Updated 29 Sep 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100