26-09-17, 04:35 AM
Dim s As String = "1"
Dim a As String = "select isnull(max(em_id),0) from employ"
Dim comman As New SqlCommand(a, cn)
ope()
Dim readr As SqlDataReader = comman.ExecuteReader
If readr.Read Then
s = readr.Item(0) + 1
emid.Text = s
End If
clos()
readr.Close()
Dim a As String = "select isnull(max(em_id),0) from employ"
Dim comman As New SqlCommand(a, cn)
ope()
Dim readr As SqlDataReader = comman.ExecuteReader
If readr.Read Then
s = readr.Item(0) + 1
emid.Text = s
End If
clos()
readr.Close()
