That is an example of how you coud design your table in SQL Server. use code like that once when you create the table where the ticket entities are stored. If you do something like this, the number will be automatically incremented each time you insert a new ticket. So, if you need to store, say, date and location for each ticket, you create the table with those columns and the identity column and the computed column, e.g:
CREATE TABLE dbo.Tickets(
Incr smallint PRIMARY KEY IDENTITY CHECK (Incr<10000),
YourNumber AS 'Ticket-' + REPLACE(STR(Incr,4),' ','0')),
OpenedDate datetime DEFAULT(GETDATE()),
LocationID tinyint REFERENCES dbo.Locations);
Then, from your application, you insert just the date and location, or, in this example, you could insert just the location, as the date will default to the date and time of the insertion. The identity column (that I named Incr) will automatically increment and the computed column (YourNumber) will concatenate your text with the number. So when you look at the data:
SELECT t.YourNumber, t.OpenedDate, l.Description
FROM dbo.Tickets t JOIN dbo.Locations l ON t.LocationID = l.ID
ORDER BY t.Incr;
You will see the data in the desired format.
Note that the incremented numbers could conceivably skip over some numbers if a transaction gets rolled back after another process has also inserted.
From VB.NET, there are several ways to work with SQL Server data. You have to decide on what methodology best suits your application and skill set.