If cn.State = ConnectionState.Closed Then
again u need to initilize the connection like cn=new Sqlconnection and cn.connectionstring=connectionInfo
Pgmer
Practically a Posting Shark
881 posts since Apr 2008
Reputation Points: 60
Solved Threads: 158
Skill Endorsements: 1
After 19 and vefore line 20 u need to initialize the connetion to SQL again
Pgmer
Practically a Posting Shark
881 posts since Apr 2008
Reputation Points: 60
Solved Threads: 158
Skill Endorsements: 1
What is the value of connectionInfo?
Reverend Jim
Carpe per diem
3,614 posts since Aug 2010
Reputation Points: 563
Solved Threads: 452
Skill Endorsements: 32
You have
connectionInfo = ConfigurationManager.AppSettings("echess")
but I still don't know what the value of connectionInfo is. I need to know the actual contents of ConfigurationManager.AppSettings("echess") to see if it is a valid connection string.
Reverend Jim
Carpe per diem
3,614 posts since Aug 2010
Reputation Points: 563
Solved Threads: 452
Skill Endorsements: 32
You can go to Project -> Properties -> Settings
Or you can set a breakpoint just after
connectionInfo = ConfigurationManager.AppSettings("echess")
or you can add the following line after that
MsgBox(connectionInfo)
Reverend Jim
Carpe per diem
3,614 posts since Aug 2010
Reputation Points: 563
Solved Threads: 452
Skill Endorsements: 32
There should be an entry in the displayed list for "echess". What is the value?
Reverend Jim
Carpe per diem
3,614 posts since Aug 2010
Reputation Points: 563
Solved Threads: 452
Skill Endorsements: 32
Question Answered as of 1 Year Ago by
Reverend Jim
and
Pgmer