PDA

View Full Version : Sorry I have uninstalled sql express 2005 and inastalled sql 2005


Dr. Kazemainy
06-18-2008, 01:04 AM
Hi. I have uninstalled sql express from my computer and installed sql 2005. How can I change my web.config file to point to sql 2005?!
Your help is highly appreciated
Thanks in advance
p.s. I have recently installed visual studio 2008 team system and this is my platform

wisemx
06-18-2008, 05:11 AM
Hi,
Post your conn sectionand I'll help you re-write it.
Also provide your Conn string from your Control Panel but comment out the password here in the forums.
Salute,
Mark

wisemx
06-19-2008, 12:18 AM
OK...Your conn string will look like this:


[quote]

<connectionStrings>
<clear/>
<remove name="LocalSqlServer"/>
<add name="LocalSqlServer" connectionString="Data Source=tcp:sql2k526.discountasp.net;Initial Catalog=SQL2005_741573_databank1;User ID=SQL2005_741573_databank1_user;Password=your-pw-here;" providerName="System.Data.SqlClient"/>
<remove name="ConnectionString1"/>
<add name="ConnectionString1" connectionString="Data Source=tcp:sql2k526.discountasp.net;Initial Catalog=SQL2005_741573_databank1;User ID=SQL2005_741573_databank1_user;Password=your-pw-here;" providerName="System.Data.SqlClient"/>
</connectionStrings></CODE>In that code section above you need to replace "your-pw-here" with your password.

Also notice I've added a duplicate section named "ConnectionString1".
This will be used for any code pages.

The section named "LocalSqlServer" will be the default replacement for your SQL Express.
Salute,
Mark

Dr. Kazemainy
06-19-2008, 12:48 AM
Thank you very much but what do you mean by the second part? Becauase I have only one config file so whereelse can I use the second part?
Thanks a lot for all tour kindness /emoticons/smile.gif

wisemx
06-19-2008, 01:30 AM
The second part I added can be accessed by any code aware 2005 or 2008 IDEs.
As an example, if I were creating a data connection to a ListView control in VS2008, it would find that.
Salute,
Mark

Dr. Kazemainy
06-19-2008, 04:06 AM
Thank you very much for all your help /emoticons/smile.gif

Dr. Kazemainy
06-19-2008, 11:01 AM
Hi here you are:
Connection String 'Data Source=tcp:sql2k526.discountasp.net;Initial Catalog=SQL2005_741573_databank1;User ID=SQL2005_741573_databank1_user'
Thank you very much