Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

The connection is already Open (State=Open) 1

Status
Not open for further replies.

royyan

Programmer
Jul 18, 2001
148
US
I keep on getting "The connection is already Open (State=Open)" error when I trying to set up a site with codes from a book. Could anyone tell me what causes the problem. Many Thanks!
 
Could be that the line of code to open a db connection is being executed twice.

If its in the page_load part of a page, make sure its wrapped in a

If Not page.IsPostBack Then

End IF

block

D'Arcy
 
Thank you very much, D'Arcy. Once I added the wrapper to the code, everything is fine now.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top