Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.sql.*;
- public class Database {
- public Database(){ // constructor
- try {
- Class.forName ("com.mysql.jdbc.Driver").newInstance();
- Connection connection = DriverManager.getConnection ("jdbc:mysql://localhost:3306/dbswcorp", "root", "");
- Statement stmt = connection.createStatement();
- String vSQL;
- vSQL = "Insert Into usermaster Values('a','b','1','c','d') ";
- stmt.execute(vSQL);
- stmt.close();
- connection.close();
- }catch(Exception e){
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement