Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static void main(String[] args) throws Exception {
- Connection connection = getMySqlConnection();
- CallableStatement proc = connection.prepareCall("{ call LCD_GetDispInfoAllTimeTable() }");
- proc.registerOutParameter(1, Types.INTEGER);
- proc.execute();
- int returnValue = proc.getInt(1);
- System.out.println(returnValue + "");
- // conn.close();
- }
- public static Connection getMySqlConnection() throws Exception {
- String driver = "com.mysql.jdbc.Driver";
- String url = "jdbc:mysql://10.8.3.70:3306/mpklocal";
- String username = "root";
- String password = "eltegpslubin";
- Class.forName(driver);
- Connection conn = DriverManager.getConnection(url, username, password);
- return conn;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement