Bom dia, não é possível executar update “pronto” pelo PreparedStatement?
Ex.
StringBuilder builder = new StringBuilder();
builder.append("update ecrcBaixa set nulote = 1, flcontabil = 2 where nutitulo = 1355 and nuParcela = 1 and nuSeqBaixa = 1 and dtcontabil = '2011-12-01';");
builder.append("update ecrcBaixa set nulote = 1, flcontabil = 2 where nutitulo = 1356 and nuParcela = 1 and nuSeqBaixa = 1 and dtcontabil = '2011-12-01';");
builder.append("update ecrcBaixa set nulote = 1, flcontabil = 2 where nutitulo = 1357 and nuParcela = 1 and nuSeqBaixa = 1 and dtcontabil = '2011-12-01';");
builder.append("update ecrcBaixa set nulote = 1, flcontabil = 2 where nutitulo = 1358 and nuParcela = 1 and nuSeqBaixa = 1 and dtcontabil = '2011-12-01';");
builder.append("update ecrcBaixa set nulote = 1, flcontabil = 2 where nutitulo = 1359 and nuParcela = 1 and nuSeqBaixa = 1 and dtcontabil = '2011-12-01';");
st = connection.prepareStatement(builder.toString());
st.executeQualquer();
Ocorre esta mensagem:
GDS Exception. 335544726. Error reading data from the connection., error code: HY000 Reason: Error reading data from the connection..