1
Reply

When I filter the dataset, though column name exists I got a

Sairam Soham

Sairam Soham

Apr 15 2015 9:58 PM
458

In the following lines of the code

foreach (DataRow row in meterDs.Tables[0].Rows)
    {
                meterChannels = string.Format("{0} = {1}", Global.MeterIdColumnName, row[Global.MeterIdColumnName].ToString());

                DataRow[] channelRows = ChannelsDs.Tables[0].Select(meterChannels);

In the following line

 DataRow[] channelRows = ChannelsDs.Tables[0].Select(meterChannels);

I got an error Cannot find column [Mtr_T1]

In the debug mode run time values are:

? row[Global.MeterIdColumnName].ToString()
"Mtr_T1"
? meterChannels
"MeterId = Mtr_T1"
? Global.MeterIdColumnName
"MeterId"

Any clue?

Thanks


Answers (1)