Visual Basic/vb6 Autogenerated Code
I want to create an auto generated code against.some station name, like when I write Sealdah, the code will be 0001, but when I write Howrah,the code will be 0001 and the code of Sealdah will be 0002, after that when I entered Kharagpur, the code will change and it will stand Kharagpur-->0001; Howrah-->0002 and Sealdah-->0003, in this way the code will continue change i.r.o.the name of Stations.
Please sir guide me. If you help me I can solve my problems.
You need to store the code in a table of a Database. The table should contain the StationCode, StationName,etc. Everytime you want to create a new code, you need to query(using sql) for the table for highest value of the StationCode , store that in a variable, add 1 to the value of the variable and then use that as the new StationCode.