Solved

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

Posted on 2009-07-07
1
585 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Use Filtering Commands to Process Files in Linux

Learn how to manipulate data with the help of various filtering commands such as `cat`, `fmt`, `pr`, and others in Linux.

Question has a verified solution.

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

Does your audience prefer people in photos or no people? How can you best highlight what you’re selling? What are your competitors doing, and what can you do that is different and unique from them?  Continue reading to learn how to make your images …
CTAs encourage people to do something specific to show interest in your company, product or service. Keep reading to learn why CTAs should always be thought of as extremely important, albeit small, sections of websites.
The viewer will learn how to dynamically set the form action using jQuery.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

624 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