Hai,
In my project am using nearly 40 forms. Here am using delivery details forms. In this am storing the records based on the DC number. In this I want to reset the DC number year by year. How can I reset this in my project.
Here this DC number number will be automatically increment in that textbox.
Example:
DC_No : 1/2014...........................10000/2014 in year 2014 and rest this will in next year like
DC_No : 1/2015............................10000/2015 like this. Year by year like wise it will automatically reset. How can I do this in my project.
Please anybody help this question ,I need to finish it quickly. Please suggest any Idea to do this.
Thanks in advance. and also am I waiting for your reply.


Raja TRank #685 · 3.5K reputationPosted Sep 21, 2015, 10:45 PM EDT
1. You can check current year and month
2. After that you can rest auto increments I'd like below
DBCC CHECKIDENT ('Ur table name' , RESEED,0)
Pavithra LRank #4,546 · 338 reputationPosted Sep 21, 2015, 10:54 PM EDT
Raja TRank #685 · 3.5K reputationPosted Sep 21, 2015, 11:00 PM EDT
Raja TRank #685 · 3.5K reputationPosted Sep 22, 2015, 1:26 AM EDT
Pavithra LRank #4,546 · 338 reputationPosted Sep 22, 2015, 4:10 AM EDT
Raja TRank #685 · 3.5K reputationPosted Sep 22, 2015, 5:06 AM EDT
Pavithra LRank #4,546 · 338 reputationPosted Sep 23, 2015, 1:02 AM EDT
Raja TRank #685 · 3.5K reputationPosted Sep 23, 2015, 8:09 AM EDT
1. check before insert record get last inserted year and current year both compare
2.after that if equal no problem insert record in table.
3.If not equal that time u can reset I'd like bellow query
DBCC CHECKIDENT ('Ur table name' , RESEED,1)
My suggestion is use store procedure for above steps easily manage.
I hope understanding my suggestions
Pavithra LRank #4,546 · 338 reputationPosted Sep 24, 2015, 9:50 PM EDT
Raja TRank #685 · 3.5K reputationPosted Sep 25, 2015, 1:06 AM EDT
Pavithra LRank #4,546 · 338 reputationPosted Sep 29, 2015, 8:53 PM EDT
Raja TRank #685 · 3.5K reputationPosted Sep 29, 2015, 9:04 PM EDT