Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Koneksi
- {
- public string mengambilKoneksi()
- {
- return "Server =REZZA\\SQLEXPRESS; Database = dbRs; User = rezza; Password = 1;";
- }
- public bool ServerTerkoneksi()
- {
- bool connect = false;
- using ( SqlConnection conn = new SqlConnection(mengambilKoneksi()))
- {
- conn.Open();
- connect = true;
- conn.Close();
- }
- return connect;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement