problems connecting to SQL Server 2005http://forums.asp.net/t/1415339.aspx/1?problems+connecting+to+SQL+Server+2005Wed, 01 Jul 2009 21:12:18 -040014153393117413http://forums.asp.net/p/1415339/3117413.aspx/1?problems+connecting+to+SQL+Server+2005problems connecting to SQL Server 2005 <p>&nbsp;I uploaded my site to godaddy and I keep getting this when I sign into my site:</p> <p><span></span></p> <h2><i><i>An error has occurred while establishing a connection to the server. &nbsp;When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)</i></i></h2> <p>I have seen this in a previous post but I am not sure how this applies to my site, here is my connection string</p> <p>&lt;connectionStrings&gt;<br> &nbsp; &lt;clear /&gt;<br> &nbsp; &lt;add name=&quot;AspnetdbConnectionString&quot; connectionString=&quot;Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\GNJDB.MDF;Integrated Security=True;User Instance=True&quot;<br> &nbsp;&nbsp; providerName=&quot;System.Data.SqlClient&quot; /&gt;<br> &nbsp; &lt;add name=&quot;GNJDBConnectionString&quot; connectionString=&quot;Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\GNJDB.mdf;Integrated Security=True;User Instance=True&quot;<br> &nbsp;&nbsp; providerName=&quot;System.Data.SqlClient&quot; /&gt;<br> &nbsp;&lt;/connectionStrings&gt;</p> <p>So do I delete this and replace it with this:</p> <p><font size="2" color="#a31515">connectionStrings</font><font size="2" color="#0000ff">&gt; </p> <p><br> </p> </font><font size="2" color="#a31515">&lt;add</font><font size="2" color="#0000ff"> </font> <font size="2" color="#ff0000">name</font><font size="2" color="#0000ff">=</font><font size="2">&quot;</font><font size="2" color="#0000ff">Personal</font><font size="2">&quot;</font><font size="2" color="#0000ff"> </font><font size="2" color="#ff0000">connectionString</font><font size="2" color="#0000ff">=</font><font size="2">&quot;</font><font size="2" color="#0000ff"> Server=<a href="http://p3swhsql-v07.shr.phx3.secureserver.net/">p3swhsql-v07.shr.phx3.secureserver.net</a>; Database=Personal; User ID=yourusername; Password=yourpassword; Trusted_Connection=False</font><font size="2">&quot;</font><font size="2" color="#0000ff"> </font><font size="2" color="#ff0000">providerName</font><font size="2" color="#0000ff">=</font><font size="2">&quot;</font><font size="2" color="#0000ff">System.Data.SqlClient</font><font size="2">&quot;</font><font size="2" color="#0000ff">/&gt; </font> <p></p> <p><font size="2" color="#a31515">&lt;remove</font><font size="2" color="#0000ff"> </font> <font size="2" color="#ff0000">name</font><font size="2" color="#0000ff">=</font><font size="2">&quot;</font><font size="2" color="#0000ff">LocalSqlServer</font><font size="2">&quot;</font><font size="2" color="#0000ff">/&gt; </p> <p><br> </p> </font><font size="2" color="#a31515">&lt;add</font><font size="2" color="#0000ff"> </font> <font size="2" color="#ff0000">name</font><font size="2" color="#0000ff">=</font><font size="2">&quot;</font><font size="2" color="#0000ff">LocalSqlServer</font><font size="2">&quot;</font><font size="2" color="#0000ff"> </font><font size="2" color="#ff0000">connectionString</font><font size="2" color="#0000ff">=</font><font size="2">&quot;</font><font size="2" color="#0000ff"> Server=<a href="http://p3swhsql-v07.shr.phx3.secureserver.net/">p3swhsql-v07.shr.phx3.secureserver.net</a>; Database=ASPNETDB; User ID=yourusername; Password=yourpassword; Trusted_Connection=False</font><font size="2">&quot;</font><font size="2" color="#0000ff"> </font><font size="2" color="#ff0000">providerName</font><font size="2" color="#0000ff">=</font><font size="2">&quot;</font><font size="2" color="#0000ff">System.Data.SqlClient</font><font size="2">&quot;</font><font size="2" color="#0000ff">/&gt; <p>&lt;/</p> </font><font size="2" color="#a31515">connectionStrings</font><font size="2" color="#0000ff">&gt;</font> <p></p> <p>&nbsp;</p> <p>I am new to this so I didn't even know I had to change anything in my web.config file and godaddy didn't say anything either.</p> <p>Thanks to anyone who can help me become less confused</p> <p>rogriall79 <br> </p> <p>&nbsp;</p> <p>&nbsp;</p> <p>&nbsp;</p> 2009-04-24T22:43:09-04:003117643http://forums.asp.net/p/1415339/3117643.aspx/1?Re+problems+connecting+to+SQL+Server+2005Re: problems connecting to SQL Server 2005 <p>I have godaddy hosting also and my connection string looks similar but unless you renamed the database I think that could be the problem, take a look at mine.&nbsp; If I remember right, I wasn't able to rename the db.&nbsp; Also try removing spaces between the semi colon and the next item in the string.</p> <font color="#0000ff" size="2"><font color="#0000ff" size="2"> <p>&lt;</font></font><font color="#a31515" size="2"><font color="#a31515" size="2">add</font></font><font color="#0000ff" size="2"><font color="#0000ff" size="2"> </font></font><font color="#ff0000" size="2"><font color="#ff0000" size="2">name</font></font><font color="#0000ff" size="2"><font color="#0000ff" size="2">=</font></font><font size="2">&quot;</font><font color="#0000ff" size="2"><font color="#0000ff" size="2">SiteSqlServer</font></font><font size="2">&quot;</font><font color="#0000ff" size="2"><font color="#0000ff" size="2"> </font></font><font color="#ff0000" size="2"><font color="#ff0000" size="2">connectionString</font></font><font color="#0000ff" size="2"><font color="#0000ff" size="2">=</font></font><font size="2">&quot;</font><font color="#0000ff" size="2"><font color="#0000ff" size="2">Server=whsql-v24.prod.mesa1.secureserver.net;Database=fro0809907092288;uid=myuid;pwd=mypwd</font></font><font size="2">&quot;</font><font color="#0000ff" size="2"><font color="#0000ff" size="2"> </font></font><font color="#ff0000" size="2"><font color="#ff0000" size="2">providerName</font></font><font color="#0000ff" size="2"><font color="#0000ff" size="2">=</font></font><font size="2">&quot;</font><font color="#0000ff" size="2"><font color="#0000ff" size="2">System.Data.SqlClient</font></font><font size="2">&quot;</font><font color="#0000ff" size="2"><font color="#0000ff" size="2"> /&gt;</font></font><font color="#0000ff" size="2"><font color="#0000ff" size="2"></p> </font></font> 2009-04-25T02:26:06-04:003119977http://forums.asp.net/p/1415339/3119977.aspx/1?Re+problems+connecting+to+SQL+Server+2005Re: problems connecting to SQL Server 2005 <p>&nbsp;Ok I see.&nbsp; I didn't change the name of my DB but how do I get the connection string from godaddy?&nbsp; if I call will they give it to me.&nbsp; Probably a dumb question but that seems to be my prob.&nbsp; I was searching around the hosting part of my account and I cant really see how it get it.&nbsp; how did you link it to their server?<br> </p> 2009-04-26T19:14:17-04:003120330http://forums.asp.net/p/1415339/3120330.aspx/1?Re+problems+connecting+to+SQL+Server+2005Re: problems connecting to SQL Server 2005 <p>After I logged in, on the left navigation there is a link named &quot;Hosting&quot;, click it.&nbsp; On the next page it will show your hosting accounts, click on the account in Manage Account under the Control Panel header.&nbsp; This will open another window, in which you click on the Databases in the Accordion control then click on SQL Server.&nbsp; There it will show your SQL Server version and name.&nbsp; If you click on the pencil it will display all your info with the exception of your password.</p> <p>Good luck, hope this helps</p> 2009-04-26T23:58:06-04:003129590http://forums.asp.net/p/1415339/3129590.aspx/1?Re+problems+connecting+to+SQL+Server+2005Re: problems connecting to SQL Server 2005 <p>&nbsp;Thanks that helped out a lot.&nbsp; It works great now....<br> </p> 2009-04-30T03:55:06-04:003131787http://forums.asp.net/p/1415339/3131787.aspx/1?Re+problems+connecting+to+SQL+Server+2005Re: problems connecting to SQL Server 2005 <p>&nbsp;OK I have one more question.&nbsp; I actually have the connection to my DB but it only shows my ASP Tables and not my Products Tables.&nbsp; I was wondering if you know whtI might be doing wrong.&nbsp; I actually went through and got rid of all my login and membership pages and tables from my website to see what is wrong.&nbsp; I am now thinking I might be using the wrong connection string.&nbsp; I used the string </p> <ul id="ctl00_DropInContentPlaceHolder_ulOLEDBTitle" class="listContainer"> <li id="ctl00_DropInContentPlaceHolder_lblOLEDBTitle" class="divContentTitle">OLE DB, OleDbConnection (.NET):</li><li><label id="ctl00_DropInContentPlaceHolder_lblOLEDB" class="labelArea">Provider=sqloledb; Data Source=GNJDB.db.4160044.hostedresource.com; Initial Catalog=GNJDB; User ID=GNJDB; Password='your password';</label></li></ul> <p>For my DB but only my ASP tables are showing.&nbsp; Do you think it might be something else?&nbsp; Should I use a different Connection string?&nbsp; I am not sure why I can only see my ASP tables and not my Product Tables.&nbsp; This is even after I deleted all login stuff from my site.</p> <p>&nbsp;</p> <p>It is starting to get to me a bit.....I really hope you can help, I am not sure why after connecting my DB only select tables are able to be used.</p> <p>&nbsp;</p> <p>Thanks RIch <br> </p> <p>&nbsp; <br> </p> <p>&nbsp;</p> 2009-04-30T22:09:56-04:003131949http://forums.asp.net/p/1415339/3131949.aspx/1?Re+problems+connecting+to+SQL+Server+2005Re: problems connecting to SQL Server 2005 <p>Any particular reason you are not using just a regular SQL client&nbsp;provider vs your OLE DB provider?</p> 2009-05-01T00:38:39-04:003131966http://forums.asp.net/p/1415339/3131966.aspx/1?Re+problems+connecting+to+SQL+Server+2005Re: problems connecting to SQL Server 2005 <p>&nbsp;Actually I don't know the difference but I will use this one instead and see how it works:</p> <ul class="listContainer"> <li id="ctl00_DropInContentPlaceHolder_lblSQLConnectionTitle" class="divContentTitle"> SqlConnection (.NET):</li><li><label id="ctl00_DropInContentPlaceHolder_lblSQLConnection" class="labelArea">Data Source=GNJDB.db.4160044.hostedresource.com; Initial Catalog=GNJDB; User ID=GNJDB; Password='your password';</label></li></ul> <p>Not sure what the difference is, I am still reading up on DB and programing so if this is the problem then I will have to look at it more.</p> <p>&nbsp;Is this what you meant by the regular SQL Client Provider? <br> </p> <p>&nbsp;</p> 2009-05-01T00:53:44-04:003132023http://forums.asp.net/p/1415339/3132023.aspx/1?Re+problems+connecting+to+SQL+Server+2005Re: problems connecting to SQL Server 2005 <p>&nbsp;These r the one i am given......which do u recommend:</p> <ul id="ctl00_DropInContentPlaceHolder_ulOBDCTitle" class="listContainer"> <li id="ctl00_DropInContentPlaceHolder_lblODBCTitle" class="divContentTitle">ODBC:</li><li><label id="ctl00_DropInContentPlaceHolder_lblODBC" class="labelArea">Driver={SQL Server}; Server=GNJDB.db.4160044.hostedresource.com; Database=GNJDB; Uid=GNJDB; Pwd='your password';</label></li></ul> <ul id="ctl00_DropInContentPlaceHolder_ulOLEDBTitle" class="listContainer"> <li id="ctl00_DropInContentPlaceHolder_lblOLEDBTitle" class="divContentTitle">OLE DB, OleDbConnection (.NET):</li><li><label id="ctl00_DropInContentPlaceHolder_lblOLEDB" class="labelArea">Provider=sqloledb; Data Source=GNJDB.db.4160044.hostedresource.com; Initial Catalog=GNJDB; User ID=GNJDB; Password='your password';</label></li></ul> <ul class="listContainer"> <li id="ctl00_DropInContentPlaceHolder_lblSQLConnectionTitle" class="divContentTitle"> SqlConnection (.NET):</li><li><label id="ctl00_DropInContentPlaceHolder_lblSQLConnection" class="labelArea">Data Source=GNJDB.db.4160044.hostedresource.com; Initial Catalog=GNJDB; User ID=GNJDB; Password='your password';</label></li></ul> I am currently using the middle one.<br> <p>&nbsp;</p> 2009-05-01T01:50:01-04:003132040http://forums.asp.net/p/1415339/3132040.aspx/1?Re+problems+connecting+to+SQL+Server+2005Re: problems connecting to SQL Server 2005 <p>Use the last one.</p> 2009-05-01T02:08:49-04:003132132http://forums.asp.net/p/1415339/3132132.aspx/1?Re+problems+connecting+to+SQL+Server+2005Re: problems connecting to SQL Server 2005 &lt;connectionStrings&gt;<br> &nbsp;&nbsp;&nbsp; &lt;clear /&gt;<br> <p>&lt;add name=&quot;GNJDBConnectionString&quot; connectionString=&quot;Data Source=GNJDB.db.4160044.hostedresource.com; Initial Catalog=GNJDB; User ID=GNJDB;Password=&quot;mypassword&quot;; Trusted_Connection=False&quot;&nbsp; providerName=&quot;System.Data.SqlClient&quot; /&gt;</p> &nbsp;&lt;/connectionStrings&gt; <p>This is my connectionstring, when i use this it doesnt show any of my actual products tables.&nbsp; Could the problem be elsewhere?&nbsp; <br> </p> 2009-05-01T03:35:19-04:003132199http://forums.asp.net/p/1415339/3132199.aspx/1?Re+problems+connecting+to+SQL+Server+2005Re: problems connecting to SQL Server 2005 <p>&nbsp;I just went through my web.config and commented out all of the asp.net membership info to see if I could get it to work properly. it does.&nbsp; I now want absolutely nothing to do with and login function and just want my DB to work properly.&nbsp; <br> </p> &nbsp;Do I have to do anything with my web.config to get me DB to just show my products?&nbsp; or to get teh connectionstring to recognize my GNJDB.&nbsp; I have the correct connectionstring I still have no clue why it isn't showing up. <p>When I click on anything that is supposed to display data this is what I get: <font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif "> <b></b></font></p> <p><span></span></p> <h2><i><i>Invalid object name 'Brands'.</i></i></h2> <p><font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif "><b>Description: </b>An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.</font></p> <p><font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif "><b>Exception Details: </b>System.Data.SqlClient.SqlException: Invalid object name 'Brands'.</font> <br> </p> <br> <p>Thanks <br> </p> 2009-05-01T04:31:24-04:003133503http://forums.asp.net/p/1415339/3133503.aspx/1?Re+problems+connecting+to+SQL+Server+2005Re: problems connecting to SQL Server 2005 <p>When you look online at your GoDaddy database manager do you see your tables in that database?&nbsp; You may have to use their tool to add them or try to connect via SSMS.</p> 2009-05-01T17:25:44-04:003133809http://forums.asp.net/p/1415339/3133809.aspx/1?Re+problems+connecting+to+SQL+Server+2005Re: problems connecting to SQL Server 2005 <p>&nbsp;When I look on godaddy's database manager it only shows my asp tables and not my product tables.&nbsp; they are in the same db so i am curious as to why it only shows half my tables.&nbsp; So you are saying I should use their program instead of filezilla, I have never connected via SSMS.&nbsp; Is it ant different?<br> </p> 2009-05-01T19:55:39-04:003133925http://forums.asp.net/p/1415339/3133925.aspx/1?Re+problems+connecting+to+SQL+Server+2005Re: problems connecting to SQL Server 2005 <p>The only way I was ever able to add tables to the database on GoDaddy was to use their tool.&nbsp; Never tried to connect via SSMS as I am guessing GoDaddy wouldn't allow it.&nbsp; Not sure how you use Filezilla to upload tables to a database but my guess is it didn't work.&nbsp; There is a tool out there provided by Microsoft that will allow you to publish your db to a hosted provider.&nbsp; What I would suggest doing is creating a backup of your db on godaddy, then coping the .bak file to your local machine, restore it to your local machine then make the mods to it and re-publish it to godaddy.</p> <p>Here is the tool</p> <p><a href="http://www.microsoft.com/downloads/details.aspx?familyid=56E5B1C5-BF17-42E0-A410-371A838E570A&amp;displaylang=en">http://www.microsoft.com/downloads/details.aspx?familyid=56E5B1C5-BF17-42E0-A410-371A838E570A&amp;displaylang=en</a></p> <p>&nbsp;</p> 2009-05-01T21:05:45-04:003134001http://forums.asp.net/p/1415339/3134001.aspx/1?Re+problems+connecting+to+SQL+Server+2005Re: problems connecting to SQL Server 2005 <p>Here is some additional help with publishing to godaddy.</p> <p><a href="http://help.godaddy.com/article/3437">http://help.godaddy.com/article/3437</a></p> <p>and a tutorial</p> <p><a href="http://products.secureserver.net/products/hosting/PublishingWithDPW.htm">http://products.secureserver.net/products/hosting/PublishingWithDPW.htm</a></p> <p>&nbsp;</p> 2009-05-01T21:55:27-04:003269852http://forums.asp.net/p/1415339/3269852.aspx/1?Re+problems+connecting+to+SQL+Server+2005Re: problems connecting to SQL Server 2005 <p>I am still having problems with my website...I was wondering if you could go to www.gnjwholesale.com and click on a link to view the error and let me know what you think might be wrong....I am really stuck.</p> <p><br> </p> <p>Thanks, rogriall79<br> </p> 2009-07-01T21:12:18-04:00