- In the extension bar, click the AdBlock Plus icon
- Click the large blue toggle for this website
- Click refresh
- In the extension bar, click the AdBlock icon
- Under "Pause on this site" click "Always"
- In the extension bar, click on the Adguard icon
- Click on the large green toggle for this website
- In the extension bar, click on the Ad Remover icon
- Click "Disable on This Website"
- In the extension bar, click on the orange lion icon
- Click the toggle on the top right, shifting from "Up" to "Down"
- In the extension bar, click on the Ghostery icon
- Click the "Anti-Tracking" shield so it says "Off"
- Click the "Ad-Blocking" stop sign so it says "Off"
- Refresh the page
- In the extension bar, click on the uBlock Origin icon
- Click on the big, blue power button
- Refresh the page
- In the extension bar, click on the uBlock icon
- Click on the big, blue power button
- Refresh the page
- In the extension bar, click on the UltraBlock icon
- Check the "Disable UltraBlock" checkbox
- Please disable your Ad Blocker
- Disable any DNS blocking tools such as AdGuardDNS or NextDNS
- Disable any privacy or tracking protection extensions such as Firefox Enhanced Tracking Protection or DuckDuckGo Privacy.
If the prompt is still appearing, please disable any tools or services you are using that block internet ads (e.g. DNS Servers, tracking protection or privacy extensions).
Question
mark85
I have a problem with my code. below is my code.
Private Sub OK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OK.Click
Dim pwd As String 'to store password entered by user
'Dim md5Hasher As New MD5CryptoServiceProvider
'Dim hashedDataBytes As Byte()
'Dim encoder As New UTF8Encoding
'hashedDataBytes = md5Hasher.ComputeHash(encoder.GetBytes(PasswordTextBox.Text))
Dim cnnFYP As SqlConnection = New SqlConnection
Dim comFYP As SqlCommand = New SqlCommand
Dim paramPwd As SqlParameter
paramPwd = New SqlParameter("@Password", SqlDbType.Binary, 16)
'paramPwd.Value = hashedDataBytes
pwd = PasswordTextBox.Text
Dim paramCount As SqlParameter
paramCount = New SqlParameter("@count", SqlDbType.Int)
paramCount.Direction = ParameterDirection.Output
'Dim strSQL As String = "select DoctorID, NurseID, DoctorPasswords, NursePasswords from DOCTOR, NURSE where DoctorID = @doctorID and NurseID = @nurseID and DoctorPasswords = @doctorpasswords and NursePasswords = @nursepasswords"
Dim strSQL As String = "select @count = COUNT(*) from DOCTOR, NURSE where DoctorID = @doctorID and NurseID = @nurseID and DoctorPasswords = @doctorpasswords and NursePasswords = @nursepasswords"
With comFYP
.Connection = cnnFYP
.CommandText = strSQL
.Parameters.AddWithValue("@doctorID", UsernameTextBox.Text)
.Parameters.AddWithValue("@nurseID", UsernameTextBox.Text)
.Parameters.Add(paramPwd)
.Parameters.Add(paramCount)
End With
cnnFYP.Open() <-- Problem here!!!
comFYP.ExecuteNonQuery()
comFYP.Dispose()
cnnFYP.Dispose()
dr = comFYP.ExecuteReader
If dr.HasRows Then
dr.Close()
Label1.Text = "Welcome"
Else
Label1.Text = "Please re-enter your password"
Label1.Visible = True
End If
cnnFYP.Close()
Me.Close()
End Sub
I try to do a login window. Below is the problem.
So what is the problem that course this?
Link to comment
https://www.neowin.net/forum/topic/475969-vbnet-connection-problem/Share on other sites
2 answers to this question
Recommended Posts