I am having an issue with the login time from my program to authenticate through the SQLExpress. I have the latest version and I am using for code this :
Dim cnn As New SqlConnection(Globals.m_con_str)
Dim cmd As New SqlCommand("star_login", cnn)
cnn.Open()
cmd.CommandType = CommandType.StoredProcedure
cmd.Parameters.AddWithValue("@UName", txtUN.Text)
cmd.Parameters.AddWithValue("@PWord", txtPW.Text)
Dim dr As SqlDataReader
dr = cmd.ExecuteReader()
If dr.HasRows Then
While dr.Read()
..........execution of successful login
end while
end if
If cnn.State = ConnectionState.Open Then
cnn.Close()
End If
My issue is this. Once you have done this once speed is good from there on out. After you log out of the program, the login is good. I have tried reindexing because I though this might be the issue but it did nothing.
Any help would be greatly appriciated
Dim cnn As New SqlConnection(Globals.m_con_str)
Dim cmd As New SqlCommand("star_login", cnn)
cnn.Open()
cmd.CommandType = CommandType.StoredProcedure
cmd.Parameters.AddWithValue("@UName", txtUN.Text)
cmd.Parameters.AddWithValue("@PWord", txtPW.Text)
Dim dr As SqlDataReader
dr = cmd.ExecuteReader()
If dr.HasRows Then
While dr.Read()
..........execution of successful login
end while
end if
If cnn.State = ConnectionState.Open Then
cnn.Close()
End If
My issue is this. Once you have done this once speed is good from there on out. After you log out of the program, the login is good. I have tried reindexing because I though this might be the issue but it did nothing.
Any help would be greatly appriciated