t = d.getSystemTable( realTableName ); } else { t = d.getTable( realTableName );
private void createSystemTables() throws SQLException, IOException { if (sysSchema) { createSystemSchema(); for (String tn : dbIO.getSystemTableNames()) { UcanaccessTable t = null; try { t = new UcanaccessTable(dbIO.getSystemTable(tn), tn); if (t != null) { createTable(t, true); loadTableData(t, true); exec("SET TABLE " + schema(SQLConverter.escapeIdentifier(t.getName()), true) + " READONLY TRUE ", false); exec("GRANT SELECT ON " + schema(SQLConverter.escapeIdentifier(t.getName()), true) + " TO PUBLIC ", false); } } catch (Exception ignore) { } } } }
data.t = data.d.getSystemTable( data.tableName ); } else { data.t = data.d.getTable( data.tableName );
private boolean checkInside(Database db) throws IOException { Table t = db.getSystemTable("MSysObjects"); Iterator<Row> it = t.iterator(); while (it.hasNext()) { Row row = it.next(); Object dobj = row.get("DateUpdate"); Object tobj = row.get("Type"); if (dobj == null || tobj == null) { continue; } Date dt = (Date) dobj; short type = (Short) tobj; if (lastModified < dt.getTime() && (type == 1 || type == 5 || type == 8) ) { return true; } } return false; }
r.put("Name", tn); catc.updateCurrentRowFromMap(r); Table srs = db.getSystemTable("MSysRelationships"); Cursor srsc = srs.getDefaultCursor();
if (name != null && name.equalsIgnoreCase(tableName)) { Integer id = (Integer) row.get("Id"); Table tsa = db.getSystemTable("MSysACEs"); Map<String, Object> rowtsa = new HashMap<String, Object>(); rowtsa.put("ObjectId", id); Table srs = db.getSystemTable("MSysRelationships"); Cursor srsc = srs.getDefaultCursor(); while ((row = srsc.getNextRow()) != null) {
UcanaccessConnection conn = UcanaccessConnection.getCtxConnection(); Database db = conn.getDbIO(); Table tbl = db.getSystemTable("MSysRelationships"); IndexCursor crsr = CursorBuilder.createCursor(tbl.getIndex("szRelationship")); Row r = crsr.findRowByEntry(relationshipName); r = crsr.findRowByEntry(relationshipName); tbl = db.getSystemTable("MSysObjects"); crsr = CursorBuilder.createCursor(tbl.getIndex("ParentIdName")); Map<String, Object> rowPattern = new HashMap<String, Object>(); Integer relationshipId = r.getInt("Id"); tbl.deleteRow(r); tbl = db.getSystemTable("MSysACEs"); crsr = CursorBuilder.createCursor(tbl.getIndex("ObjectId")); r = crsr.findRowByEntry(relationshipId);