tags:

views:

33

answers:

0

Has anyone seen this error before when making a Linq to SQL call?

Invalid attempt to call FieldCount when reader is closed

Here's the code:

public static MM GetDeviceConfiguration(long ipAddress)
{
    string sprocName = ConfigurationBL.ReadSproc("ReadDeviceConfiguration");
    return db.ExecuteQuery<MM>("exec {0} @IPAddressNumber = {1}", sprocName, ipAddress).FirstOrDefault();
}

Thanks, Justin