Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Default values by session context. #45

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -792,6 +792,7 @@ private static void loadPreferences(Properties context) {
pstmt.close();
}

// TODO: Improve with only table dimensions
// Default Values
log.info("Default Values ...");
sql = "SELECT t.TableName, c.ColumnName "
Expand All @@ -800,18 +801,19 @@ private static void loadPreferences(Properties context) {
+ "WHERE c.IsKey='Y' AND t.IsActive='Y'"
+ " AND EXISTS (SELECT * FROM AD_Column cc "
+ " WHERE ColumnName = 'IsDefault' AND t.AD_Table_ID=cc.AD_Table_ID AND cc.IsActive='Y')";
pstmt = DB.prepareStatement(sql, null);
rs = pstmt.executeQuery();
while (rs.next()) {
loadDefault (context, rs.getString(1), rs.getString(2));
}
rs.close();
pstmt.close();
pstmt = null;
// pstmt = DB.prepareStatement(sql, null);
// rs = pstmt.executeQuery();
// while (rs.next()) {
// loadDefault (context, rs.getString(1), rs.getString(2));
// }
// rs.close();
// pstmt.close();
} catch (SQLException e) {
log.log(Level.SEVERE, "loadPreferences", e);
e.printStackTrace();
} finally {
pstmt = null;
rs = null;
DB.close(rs, pstmt);
}
// Country
Expand Down
Loading