Code example for Connection

Methods: createStatement

0
		Connection conn = null;
		java.sql.Statement st = null;
		tm.begin();
		try { 
			conn = (Connection) datas.getConnection();
			st = conn.createStatement();
			st.executeUpdate("create table testTable (id integer)");
		} finally { 
			if (st != null) {
				st.close();
			} 
 
			if (conn != null) {
				conn.close();
			} 
		} 
		tm.commit();
 
		ds1.setNewConnectionSql("insert into testTable values (1)");
	} 
Contextual code suggestions in your IDE  Get Codota for Java