automatic id generation which is a primary key
- by abhi
in vb.net while entering a new entry i want to assign a record a unique id
like in case of numeric i do this way
Dim ItemID As Integer
KAYAReqConn.Open()
SQLCmd = New SqlCommand("SELECT ISNULL(MAX(ItemID),0) AS ItemID from MstItem", ReqConn)
Dim dr As SqlDataReader
dr = SQLCmd.ExecuteReader
If dr.HasRows Then
dr.Read()
ItemID =…