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