View Single Post
 
Old October 12th, 2009, 10:52 PM
arnabghosh arnabghosh is offline
Friend of Wrox
Points: 686, Level: 9
Points: 686, Level: 9 Points: 686, Level: 9 Points: 686, Level: 9
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2005
Location: Kolkata, West Bengal, India.
Posts: 128
Thanks: 0
Thanked 0 Times in 0 Posts
Default Auto Increment Alphanumeric Code

Hi All !!

I need to generate an Alphanumeric Code for products for my Application where I have to add products to the database starting with 'P001' , 'P002' and so on. Everytime I add a new product the code will check for the last code entered, increment it and generate the next code. For example if the last Code in the database is 'P085' then it will create a new code as 'P086'

The code is a Text field in Access Database.

If someone has a code for this in C# please give. Any help would be appreciated.

Thanks in Advance