Try removing System.Configuration from the line in question. (Leave just ConfigurationManager.ConnectionStrings(...)).
If that does nothing, try using a string variable to capture the connection string and then use the string as the argument in your SqlConnection.
If these don't work, send back the actual error message you're getting.
--
Christopher A. Reed
"The oxen are slow, but the earth is patient."
Imports System.Data.SqlClient
Imports System.Configuration
Public Class frmQuestions
Private Sub NaujasToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles NaujasToolStripMenuItem.Click
Dim Result As DialogResult
frmQuestEdit.veiksmas = 1
Result = frmQuestEdit.ShowDialog(Me)
If Result = Windows.Forms.DialogResult.OK Then
End If
End Sub
Private Sub frmQuestions_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Me.WindowState = FormWindowState.Maximized
PopulateTree()
End Sub
Private Sub PopulateTree()
Dim sqlConn As New SqlClient.SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings("CallRegistrationConnectionString"))
Dim sqlCmd As SqlClient.SqlCommand
Dim sqlReader As SqlClient.SqlDataReader
sqlConn.Open()
sqlCmd = sqlConn.CreateCommand
sqlCmd.CommandText = "select * from vwKlausimai"
sqlReader = sqlCmd.ExecuteReader
Me.trvwQuestions.Nodes.Clear()
While sqlReader.Read
Debug.Print(sqlReader("Klausimas"))
End While
sqlConn.Close()
End Sub
End Class
in bold section I am geting the error. It is very intrasting that ConfigurationManager working in immediate section.