mohamad guntur

mohamad guntur

  • NA
  • 40
  • 40.8k

How to make an autogenerated Primary Key when add new data in VB.NET?

Oct 4 2012 3:56 AM
My primary key type is char(5) and the format is BR000
i want to add for every new data insertion the PK will generate automatically

like 'BR000' +1

in examples:

ID_PRODUCT       PRODUCT_NAME
=========       ============ 
BR001                PENCILS
BR002                ERASER



if i input the next PRODUCT_NAME on textbox it should be BR003 for new ID_PRODUCT on the textbox id

Answers (17)