I am trying to create an application in my VS 2002 application. I took some
of the code from my web page where it works fine.
I can connect fine from my Sql Query Analyser to both my local Sql Server
and off Sql Server machines.
But I am getting the following error from my "objConn.Open()".
Is this a problem from going from my web to a normal application?
The error is:
The ConnectionString property has not been initialized
My code is:
Imports System.Data
Imports System.Data.SqlClient
....
Dim dbReader As SqlDataReader
Dim ConnectionString As String =
System.Configuration.ConfigurationSettings.AppSett ings("Persist Security
Info=False;Data Source=balair.interez.com;Initial Catalog=InterezData;User
ID=xxx;Password=xxxx;")
Dim objConn As New SqlConnection(ConnectionString)
Dim CommandText As String = "GetCandidateSearchDrops"
Dim objCmd As New SqlCommand(CommandText, objConn)
objCmd.CommandType = CommandType.StoredProcedure
With objCmd.Parameters
.Add("@CompanyID", SqlDbType.Int).Value = 153973
End With
objConn.Open()
dbReader = objCmd.ExecuteReader
Thanks,
Tom