Commit bba0c29e by Patryk Czarnik

plik properties

parent cc9a0ff2
url=jdbc:postgresql://localhost/hr
user=kurs
password=abc123
tcpKeepAlive=true
......@@ -10,7 +10,7 @@ public class P14a_Procedura_BrakWyniku {
// Ta procedura przyjmuje tylko parametry typu IN i nie zwraca wyniku. W kolejnych plikach przykłady innych sytuacji.
public static void main(String[] args) {
try(Connection c = DriverManager.getConnection(Ustawienia.URL, Ustawienia.USER, Ustawienia.PASSWD);
CallableStatement stmt = c.prepareCall("{call przenies_pracownika(?,?,?)}")) {
CallableStatement stmt = c.prepareCall("CALL przenies_pracownika(?,?,?)")) {
stmt.setInt(1, 112);
stmt.setInt(2, 60);
stmt.setString(3, "IT_PROG");
......
......@@ -13,7 +13,7 @@ public class P14b_Procedura_ParametryOut {
int nrDep = sc.nextInt();
try(Connection c = DriverManager.getConnection(Ustawienia.URL, Ustawienia.USER, Ustawienia.PASSWD);
CallableStatement stmt = c.prepareCall("{call statystyki_departamentu(?,?,?,?,?)}")) {
CallableStatement stmt = c.prepareCall("{CALL statystyki_departamentu(?,?,?,?,?)}")) {
// parametrom IN ustawiamy wartości
stmt.setInt(1, nrDep);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment