Solved

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

Posted on 2009-07-07
1
564 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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

I've been asked to discuss some of the UX activities that I'm using with my team. Here I will share some details about how we approach UX projects.
Any business that wants to seriously grow needs to keep the needs and desires of an international audience of their websites in mind. Making a website friendly to international users isn’t prohibitively expensive and can provide an incredible return…
This video teaches users how to migrate an existing Wordpress website to a new domain.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

759 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now