Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- strSQL = "SELECT * FROM tblLogin WHERE IDLogin ='" & txtIDLogin.Text & "'"
- com = New MySql.Data.MySqlClient.MySqlCommand(strSQL, conn)
- rd = com.ExecuteReader()
- rd.Read()
- If rd.HasRows Then
- Call konek()
- strSQL = "Update tblLogin set Username = '" & txtUsername.Text & _
- "', Password = '" & txtPassword.Text & _
- "', Status = '" & cboStatus.Text & _
- "' where IDLogin = '" & txtIDLogin.Text & "'"
- com = New MySql.Data.MySqlClient.MySqlCommand(strSQL, conn)
- com.ExecuteNonQuery()
- Else
- Call konek()
- strSQL = "INSERT INTO tblLogin VALUES ('" & _
- txtIDLogin.Text & "','" & txtUsername.Text & "','" & _
- txtPassword.Text & "','" & cboStatus.Text & "')"
- com = New MySql.Data.MySqlClient.MySqlCommand(strSQL, conn)
- com.ExecuteNonQuery()
- End If
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement