Solved

SQL database connection: first string to connect from a c# page

Posted on 2009-07-07
1
575 Views
Last Modified: 2012-05-07
Hi all,

I am attempting to create and test my first string connection to a sql server test database, without success.  

I will provide here all the information to connect the database here, and will change the credentials later.  Anyway, this is just a test database.

I created this test database on godaddy.com.  I entered the name of the database and provided a password.  The string they then recommend is:  

Data Source=testtest12345.db.2653863.hostedresource.com; Initial Catalog=testtest12345; User ID=testtest12345; Password='your password';

My password is: Test1Test  

I tried in the web.config, inside the <connectionstrings>, to add this line:

<add name="testfirststring" connectionString="Data Source=testtest12345.db.2653863.hostedresource.com; Initial Catalog=testtest12345; User ID=testtest12345; Password=Test1Test;" providerName="System.Data.SqlClient"/>

Then, from visual studio, I dragged and droped a SqlDataSource, in the body of my default.aspx page, which generated the line:

<asp:SqlDataSource ID="SqlDataSource1" runat="server"></asp:SqlDataSource>

 Then, in design view, I right click and chose Configure data source.   I choose my testfirststring connection which is available in the menu, and when i press next, i get the error message shown in the image below.  I really do not know what I can do.

Anyone would know what I am doing wrong?  Anyone is able to connect to my database?  

Thanks!  I am clueless here.
Error message from Visual Studio:  "Database schema could not be retrieved from this connection..."

Open in new window

errormessage.jpg
0
Comment
Question by:ThanksWelcome
1 Comment
 

Accepted Solution

by:
ThanksWelcome earned 0 total points
ID: 24797673
I found the problem after half a day of research:  the database was not setup to be available remotely, so I could not test the connection remotely, which I tried to do.

I now have the connection working.  Thanks!

0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Developer portfolios can be a bit of an enigma—how do you present yourself to employers without burying them in lines of code?  A modern portfolio is more than just work samples, it’s also a statement of how you work.
Color can increase conversions, create feelings of warmth or even incite people to get behind a cause. If you want your website to really impact site visitors, then it is vital to consider the impact color has on them.
Any person in technology especially those working for big companies should at least know about the basics of web accessibility. Believe it or not there are even laws in place that require businesses to provide such means for the disabled and aging p…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question