System.Data.ExprException.UnboundName C# (CSharp) Method

UnboundName() public static method

public static UnboundName ( string name ) : Exception
name string
return Exception
        public static Exception UnboundName(string name)
        {
            return _Eval(SR.Format(SR.Expr_UnboundName, name));
        }

Usage Example

コード例 #1
0
        internal override object Eval(DataRow row, DataRowVersion version)
        {
            if (!found)
            {
#if DEBUG
                if (CompModSwitches.NameNode.TraceVerbose)
                {
                    Debug.WriteLine("Can not find column " + name);
                }
#endif
                throw ExprException.UnboundName(name);
            }

            if (row == null)
            {
                if (IsTableConstant()) // this column is TableConstant Aggregate Function
                {
                    return(column.DataExpression.Evaluate());
                }
                else
                {
#if DEBUG
                    if (CompModSwitches.NameNode.TraceVerbose)
                    {
                        Debug.WriteLine("Can not eval column without a row.." + name);
                    }
#endif
                    throw ExprException.UnboundName(name);
                }
            }

            return(column[row.GetRecordFromVersion(version)]);
        }
All Usage Examples Of System.Data.ExprException::UnboundName