In the sql database definition i am able to set my primary key to int data type
and auto increment that number (identity specification), thus the result will be in 1, 2, 3,....
but how can i add some string into it? example C0001, C0002, C0003, etc ?

In most cases you can just format the number in that way AFTER you have retrieved it with a query from the database. DO NOT store it in this format.

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.