Simply moving a SELECT statement into a stored procedure will not result in
your observation.
You need to verify that the stored procedure is returning what you think it
is returning. You should be able to run both the stored procedure and the
SELECT statement in Query Analyzer and verify that they return the same
things (they should). One thing to look for is if the stored procedure
returns more than one result set. It will return one result set for each
SELECT statement it contains that gets executed. If this is the case, then
you may be trying to bind the datagrid to the wrong result set - and that's
why it's choking.
And in you application, be sure that your .CommandType is StoredProcedure -
like this:
cmd.CommandType = CommandType.Sto redProcedure;
-HTH
".Net Sports" <ba********@cox .net> wrote in message
news:11******** *************@o 13g2000cwo.goog legroups.com...
i have an aliased column in an sql statement that works fine when
displaying its output in a datagrid, but when I transfer the sql
statement into a stored procedure , the datagrid can't see it. I get an
error "{"DataBinder.E val: 'System.Data.Da taRowView' does not contain a
property with the name myaliasedcolumn ." }