Reverting usage of MQuery for MTable class.
ADemepire is not even able to start from Eclipse. Please next time at least try to start ADemepire from Eclipse. https://sourceforge.net/tracker/index.php?func=detail&aid=2214883&group_id=176962&atid=879335
This commit is contained in:
parent
370a752666
commit
19d419e47d
|
@ -50,7 +50,6 @@ import org.compiere.util.Util;
|
|||
*/
|
||||
public class MTable extends X_AD_Table
|
||||
{
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
|
@ -98,10 +97,34 @@ public class MTable extends X_AD_Table
|
|||
}
|
||||
}
|
||||
//
|
||||
final String whereClause = "UPPER("+I_AD_Table.COLUMNNAME_TableName+")=?";
|
||||
MTable retValue = new Query(ctx,I_AD_Table.Table_Name,whereClause,null)
|
||||
.setParameters(tableName.toUpperCase())
|
||||
.first();
|
||||
MTable retValue = null;
|
||||
String sql = "SELECT * FROM AD_Table WHERE UPPER(TableName)=?";
|
||||
PreparedStatement pstmt = null;
|
||||
try
|
||||
{
|
||||
pstmt = DB.prepareStatement (sql, null);
|
||||
pstmt.setString(1, tableName.toUpperCase());
|
||||
ResultSet rs = pstmt.executeQuery ();
|
||||
if (rs.next ())
|
||||
retValue = new MTable (ctx, rs, null);
|
||||
rs.close ();
|
||||
pstmt.close ();
|
||||
pstmt = null;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
s_log.log(Level.SEVERE, sql, e);
|
||||
}
|
||||
try
|
||||
{
|
||||
if (pstmt != null)
|
||||
pstmt.close ();
|
||||
pstmt = null;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
pstmt = null;
|
||||
}
|
||||
|
||||
if (retValue != null)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue