locked
error ExecuteReader requires an open and available Connection. RRS feed

  • Question

  • User1149920811 posted

    i got recently this error ExecuteReader requires an open and available Connection. The connection's current state is connecting. how do reolve it

    Saturday, December 28, 2013 4:58 AM

All replies

  • User753101303 posted

    Hi,

    Showing some code could help. Is your layer so that the connection you are using is tied to this particular reader ? It seems you are trying to connect and then use this connection without waiting for the connection to be completed. Do you use OpenAsync ?

    Saturday, December 28, 2013 7:51 AM
  • User364663285 posted

    Add this line

    conn.Open();

    Monday, January 20, 2014 3:43 AM