FindTable() public method

public FindTable ( string schema, string name ) : IFromTableSource
schema string
name string
return IFromTableSource
Ejemplo n.º 1
0
        public void SelectAllColumnsFromSource(ObjectName tableName)
        {
            // Attempt to find the table in the from set.
            string schema = null;

            if (tableName.Parent != null)
            {
                schema = tableName.Parent.Name;
            }

            IFromTableSource table = fromSet.FindTable(schema, tableName.Name);

            if (table == null)
            {
                throw new InvalidOperationException(tableName + ".* is not a valid reference.");
            }

            AddAllFromTable(table);
        }