Compilation Error Not Understood
Hi everyone,
I get the following compiling error:
System.ArgumentException was unhandled
Message="Format of the initialization string does not conform to specification starting at index 0."
It points at the following line in the code:
System.Data.SqlClient.SqlConnection sqlConnection1 = new System.Data.SqlClient.SqlConnection("ServiceManagerDBConnectionString");
As you might have already guessed I am trying to open a new connection string for this method which should insert records into a database.
Q1 - Can anyone explain this compilation error?
Q2 - In the app.config, the name of the connection string is in multiparts seperated by periods. I only typed the last part, which I know is the actual name of the connection string. Was I wrong not to include the other parameters?
<connectionStrings>
<add name="CarServiceManager.Properties.Settings.ServiceManagerDBConnectionString"
connectionString="Data Source=|DataDirectory|\database\ServiceManagerDB.sdf"
providerName="Microsoft.SqlServerCe.Client.3.5" />
</connectionStrings>
I hope my question is not too confusing, as I am new to programming.
I thank you all for your help in advance