public DataSet doQueryTemplate(string sqlTemplate) { DataSet result = null; DatabasePersist d = (DatabasePersist)persistence; string sql = d.processSql(sqlTemplate); result = d.executeQuery(sql); return(result); }
public long doCommandTemplate(string sqlTemplate) { long result = 0; string sql = string.Empty; try { DatabasePersist d = (DatabasePersist)persistence; sql = d.processSql(sqlTemplate); result = d.executeCommand(sql); } catch (Exception x) { Logger.log(this, x, "Error processing " + sql); } return(result); }
public virtual T doSingleObjectQuery <T>(string action) where T : System.Collections.IDictionary, new() { T result = new T(); DataSet dataSet = doQuery(action); if (DatabasePersist.hasData(dataSet)) { DataRow r = dataSet.Tables[0].Rows[0]; foreach (DataColumn c in r.Table.Columns) { result.Add(c.ColumnName, r[c.ColumnName]); } } return(result); }