---
title: "ExecuteReader requires an open and available Connection. The connection's current state is closed."  
description: "ExecuteReader requires an open and available Connection. The connection's current state is closed."  
author: "Tarun Kumar"  
published: 2016-02-24  
updated: 2016-02-24  
canonical: https://www.mindstick.com/forum/33999/executereader-requires-an-open-and-available-connection-the-connection-s-current-state-is-closed  
category: "c#"  
tags: ["c#", ".net", "sql server", "sql"]  
reading_time: 1 minute  

---

# ExecuteReader requires an open and available Connection. The connection's current state is closed.

Hi everyone,When [trying](https://answers.mindstick.com/qa/93698/6-mistakes-couples-are-trying-to-save-money) to [connect](https://www.mindstick.com/articles/12810/how-to-connect-tablet-to-external-monitor-or-flat-screen-tv-using-computer-adapters) to [MSSQL Server](https://www.mindstick.com/forum/159376/foreign-key-works-if-we-communicate-with-two-databases-in-mssql-server) I [am getting](https://www.mindstick.com/forum/34179/i-am-getting-error-while-assigning-the-data-to-the-array-list) following [error](https://yourviews.mindstick.com/view/88527/fixing-quickbooks-error-4120-reinstalling-vs-repairing)\

```
ExecuteReader requires an open and available Connection. The connection's current state is closed.
```

Please help

## Replies

### Reply by Uttam Misra

I think you forgot to open your connection.\
check following line of code:\

```
if (_conn.State == ConnectionState.Closed) _conn.Open();Happy Coding!!!
```


---

Original Source: https://www.mindstick.com/forum/33999/executereader-requires-an-open-and-available-connection-the-connection-s-current-state-is-closed

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
