This is for my vb.net code when new record inserted patient id is checking for database value and incremented by next value ... code working fine to incremented only for 1 to 10 ....if record exceeds 10 value cannot be incremented ...help me folks ...
Dim oleDBDR As OleDbDataReader
Dim oleDBCommand As New OleDbCommand
With oleDBCommand
.Connection = conn
.CommandText = "SELECT * FROM tblPatient ORDER BY PatientID DESC"
End With
oleDBDR = oleDBCommand.ExecuteReader
If oleDBDR.Read Then
txtPatientID.Text = Val(oleDBDR.Item(0)) + 1
End If