IDEMPIERE-3911:lookup table should consistent

This commit is contained in:
hieplq 2019-03-02 20:37:28 +07:00
parent f959070adc
commit e20f725f6c
1 changed files with 2 additions and 2 deletions

View File

@ -624,13 +624,13 @@ public class MTable extends X_AD_Table
*/ */
public static int getTable_ID(String tableName, String trxName) { public static int getTable_ID(String tableName, String trxName) {
int retValue = 0; int retValue = 0;
String SQL = "SELECT AD_Table_ID FROM AD_Table WHERE tablename = ?"; String SQL = "SELECT AD_Table_ID FROM AD_Table WHERE UPPER(tablename) = ?";
PreparedStatement pstmt = null; PreparedStatement pstmt = null;
ResultSet rs = null; ResultSet rs = null;
try try
{ {
pstmt = DB.prepareStatement(SQL, trxName); pstmt = DB.prepareStatement(SQL, trxName);
pstmt.setString(1, tableName); pstmt.setString(1, tableName.toUpperCase());
rs = pstmt.executeQuery(); rs = pstmt.executeQuery();
if (rs.next()) if (rs.next())
retValue = rs.getInt(1); retValue = rs.getInt(1);