Azavea.Open.DAO.SQL.SqlConnectionUtilities.XSafeStringListQuery C# (CSharp) Method

XSafeStringListQuery() public static method

Similar to the other XSafe methods, except this one returns a list of strings (for example, SELECT NAME FROM EMPLOYEES).
public static XSafeStringListQuery ( AbstractSqlConnectionDescriptor connDesc, SqlTransaction transaction, string sql, IEnumerable sqlParams ) : IList
connDesc AbstractSqlConnectionDescriptor The database connection descriptor. This is used both as /// a key for caching connections/commands as well as for /// getting the actual database connection the first time.
transaction SqlTransaction The transaction to do this as part of.
sql string The SQL query to execute.
sqlParams IEnumerable A list of objects to use as parameters /// to the SQL statement. The list may be /// null if there are no parameters.
return IList
        public static IList<string> XSafeStringListQuery(AbstractSqlConnectionDescriptor connDesc,
            SqlTransaction transaction, string sql, IEnumerable sqlParams)
        {
            Hashtable parameters = DbCaches.Hashtables.Get();
            XSafeQuery(connDesc, transaction, sql, sqlParams, ReadStringsFromQuery, parameters);
            IList<string> retVal = (IList<string>)parameters["results"];
            DbCaches.Hashtables.Return(parameters);
            return retVal;
        }

Same methods

SqlConnectionUtilities::XSafeStringListQuery ( AbstractSqlConnectionDescriptor connDesc, string sql, IEnumerable sqlParams ) : IList