Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void dbConnect()
- {
- SqlConnection conn = new SqlConnection();
- conn.ConnectionString = ("Server= localhost; Database= leaguedraw; Password= [private]; Integrated Security = SSPI");
- SqlCommand username = new SqlCommand("SELECT username FROM users where username = @username");
- try
- {
- conn.Open();
- MessageBox.Show("Connection is Open");
- conn.Close();
- }
- catch(Exception ex)
- {
- MessageBox.Show("Connection not Found");
- }
- }
Add Comment
Please, Sign In to add comment