clarification needed in postgresql... + transactions...

Поиск
Список
Период
Сортировка
От dinakar
Тема clarification needed in postgresql... + transactions...
Дата
Msg-id 20040119121718.43298.qmail@web10704.mail.yahoo.com
обсуждение исходный текст
Ответы Re: clarification needed in postgresql... + transactions...  (Kris Jurka <books@ejurka.com>)
Список pgsql-jdbc
hi all,

i need a clarification in java + postgresql.

currently iam using tomcat 4.0, jdk 1.4, postgresql
7.3.x.

i using the below code to fetch data from database,

con =
DriverManager.getConnection("jdbc:postgresql://192.168.2.51:5432/wsas_test","wsas",
"wsas");

//con.setAutoCommit(false);
System.out.println(con.getAutoCommit());
preStmt = con.prepareStatement("BEGIN;SELECT
fn_list_allpatients('cursor_name');");
resultSet = preStmt.executeQuery();
String strCn = "cursor_name";
preStmt = con.prepareStatement("FETCH ALL IN \"" +
strCn + "\";END;");
resultSet = preStmt.executeQuery();
//con.setAutoCommit(true);
while (resultSet.next())
          {
    System.out.println(resultSet.getString(1) +
resultSet.getString("patient_title"));
}

if i dont use the setautocommit to false and true
respectively the above code is not working,

i need to know will the above code create any problem
in multiuser application...

currently iam facing a problem that some transactions
are ideal even after closing the connection to
database...


please advice..

thanks
dinakar

__________________________________
Do you Yahoo!?
Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
http://hotjobs.sweepstakes.yahoo.com/signingbonus

В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Kris Jurka
Дата:
Сообщение: Re: Dreamweaver MX/jdbc
Следующее
От: Fischer Krisztián
Дата:
Сообщение: ResultSet.previous() - ArrayIndexOutOfBoundsException