Link to home
Start Free TrialLog in
Avatar of ThanksWelcome
ThanksWelcomeFlag for Canada

asked on

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

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
ASKER CERTIFIED SOLUTION
Avatar of ThanksWelcome
ThanksWelcome
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial