mitchel.sellers@gmail.com wrote
As mentioned above, you must keep the key name as SiteSqlServer unless you change that everywhere.
Otherwise your setup looks correct as long as it is a default instance of SQL Server and not a named instance.
Ok I think I corrected the issue, here is my new file:
<connectionStrings>
<!-- Connection String for SQL Server 2005 Express -->
<add
name="SiteSqlServer"
connectionString="Data Source=.\SQLExpress;Integrated Security=True;User Instance=True;AttachDBFilename=|DataDirectory|Database.mdf;"
providerName="System.Data.SqlClient" />
<!-- Connection String for SQL Server 2000/2005
<add
name="SiteSqlServer"
connectionString="Server=(local);Database=grimoirecodex;uid=grimoire access;pwd=mypassword;"
providerName="System.Data.SqlClient" />
-->
</connectionStrings>
<appSettings>
<!-- Connection String for SQL Server 2005 Express - kept for backwards compatability - legacy modules -->
<add key="SiteSqlServer" value="Data Source=.\SQLExpress;Integrated Security=True;User Instance=True;AttachDBFilename=|DataDirectory|Database.mdf;"/>
<!-- Connection String for SQL Server 2000/2005 - kept for backwards compatability - legacy modules
<add key="SiteSqlServer" value="Server=(local);Database=grimoirecodex;uid=grimoire access;pwd=mypassword;"/>
-->
I did not change any other aspect in the file. Yet I still get 'cant connect to database' error. Is the username "grimoire access" with the space causing the issue? (I know coming from a PHP CMS that would be a issue with MySQL)
When I installed MSSQL I believe I did do a default install. Any suggestion appreciated.