Noear.Weed.DbReader.GetName C# (CSharp) Method

GetName() public method

public GetName ( int index ) : string
index int
return string
        public string GetName(int index)
        {
            return _InnerReader.GetName(index);
        }

Usage Example

Ejemplo n.º 1
0
        public DataItem getRow(Command cmd, DbTran transaction)
        {
            DataItem row = new DataItem();

            try {
                reader = query(cmd, transaction);
                if (reader.Read())
                {
                    int len = reader.FieldCount;

                    for (int i = 0; i < len; i++)
                    {
                        row.set(reader.GetName(i), reader[i]);
                    }
                }

                if (row.count() > 0)
                {
                    return(row);
                }
                else
                {
                    return(null);
                }
            }
            catch (Exception ex) {
                WeedConfig.logException(cmd, ex);
                throw ex;
            }
            finally {
                tryClose();
            }
        }