daily pastebin goal
4%
SHARE
TWEET

Untitled

a guest Dec 6th, 2016 87 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import java.sql.Connection;
  2. import java.sql.DriverManager;
  3. import java.sql.Statement;
  4.  
  5. public class Connect
  6. {
  7.     public static void main(String[] args)
  8.     {
  9.         try
  10.         {
  11.             Class.forName("org.postgresql.Driver");
  12.             Connection con = DriverManager.getConnection("jdbc::postgresql://localhost:5432/postgres", "postgres", "ankara");
  13.             if(con != null)
  14.                 System.out.println("Connected");
  15.            
  16.             Statement st = con.createStatement();
  17.             String sql;
  18.         }
  19.         catch(Exception ee)
  20.         {
  21.             ee.printStackTrace();
  22.         }
  23.     }
  24. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top