Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package connection;
- import com.mysql.jdbc.Connection;
- import java.sql.DriverManager;
- import javax.swing.JOptionPane;
- /**
- *
- * @author aldycavalera
- */
- public class connect {
- static Connection Connect;
- public static Connection getConnection()
- {
- try {
- Connect = (Connection) DriverManager.getConnection("jdbc:mysql://localhost/toko_botay", "root", "");
- } catch(Exception e) {
- JOptionPane.showMessageDialog(null,"koneksi database gagal!");
- }
- return null;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement