Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static void main(String[] args) throws SQLException {
- String sku = "1";
- String[] cross = { "0514", "0414", "0314", "0214", "0114", "1213", "1113", "1013", "0913", "0813", "0713", "0613" };
- String sqlString = "Insert into dbo.Inventory_Metrics (sku, cross) values(?,?)";
- Connection conn = DriverManager.getConnection(getPostgresConnUrl());
- PreparedStatement ps = conn.prepareStatement(sqlString);
- ps.setObject(1, sku);
- ps.setObject(2, cross, java.sql.Types.VARCHAR, cross.length);
- //Throws an error
- int status = ps.executeUpdate();
- ps.close();
- System.out.print(status);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement