I am doing small vbproject that must auto generate id using the current year/month/autonumber in vb.net-(VISUAL STUDIO 2010) with MS SQL database. When the form load the autonumber should be displayed in text. And when it save, it should be saved in the database MSSQL. The id number should be like this eg: "2024/07/000000, 2024/07/000001" and so on. Please kindly help me as soon as possible. please. Thanks in advance.

Personally, I'd use three separate (number) columns for this, combined with an INSERT trigger. The value you want to show can be a calculated column, combining the three into your display format of choice.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.