06-11-18, 03:07 AM
كود :
Public Function GetMaid() As Integer
Dim x As Integer = 0
If Con.State = ConnectionState.Closed Then
Con.Open()
End If
Dim adp As New OleDbCommand("select max (user_id) from users", Con)
Try
x = adp.ExecuteScalar
Return x
Catch ex As Exception
Return x
Con.Close()
End Try
End Function