SQL Server 2008 Connection Issue: simple to fix?

Discussion in 'Databases' started by PJ2010, Apr 30, 2011.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. I hope it's as easy to fix this--and I think it is--as another noob question I once had: http://community.discountasp.net/showthread.php?t=9722

    OK I'm trying to migrate from SQL Server 2008 using Visual Studio 2008 to SQL Server 2008 R2 using Visual Studio 2010. I have about a couple of years experience programming in databases on and off using C# as the code-behind language (by no means an expert, but not a complete newbie either) but it's been over six months since I've touched a database so I'm a bit rusty.


    With the background, please review the screenshot and the below info and tell me what am I doing wrong--anything very obvious stick out?

    I uploaded a database that's working fine (running queries, etc) in localhost to my new ASP.NET 4.0 DiscountASP website, and I "attached" it per the instructions here: http://support.discountasp.net/KB/a188/sql-2008-management-tools.aspx

    and everything seems OK.

    Now, under Visual Studio 2010 I click on Server Explorer to test the connection, clicking on Add New Connection, then Microsoft SQL Server (all using Visual Studio 2010 Professional, Academic Version, on a modern multi-core pc running Windows 7), and I get the errors shown in the three screenshots below. As you can see, I think I filed in the blanks correctly, correct?

    Here are the screenshots:

    http://www.filetolink.com/f7686ac1 *288 kb* - first screenshot

    http://www.filetolink.com/29f4d299 *288 kb* - second screenshot

    http://www.filetolink.com/f8bcfa7e *288 kb* - second screenshot


    Here is the information (with password blanked out) that my remote database and website provider, DiscountASP, has given me:

    SQL Server Name esql2k803.discountasp.net
    Database Name SQL2008R2_815195_lp2
    Database Space
    500 MB (Add SQL Disk Space)
    Database Login SQL2008R2_815195_lp2_user

    Connection String "Data Source=tcp:esql2k803.discountasp.net;Initial Catalog=SQL2008R2_815195_lp2;User ID=SQL2008R2_815195_lp2_user;Password=*****;"


    What am I doing wrong?


    Is this the way to do a "Hello World" to test a new database? I think so, but if anybody has a better way, including some code in C#, please let me know.
     
  2. Update: I turned off the Windows defender firewall and get the same error message, so it's not my firewall
     
  3. RayH

    RayH DiscountASP.NET Lackey DiscountASP.NET Staff

    The username you supplied is incorrect. You should be using SQL2008R2_815195_lp2_user
     
  4. Still not working

    I tried your suggestion, and still not working (but thanks).

    Check out this screenshot: http://www.filetolink.com/720e550d

    Also note I tried adding "tcp:" in front of the server name but still no luck (with or without these letters).

    Any other ideas? Can you test this from your end to see if you can connect to the database? I can give you the password--there's nothing sensitive in this database. Do I open a Help Ticket?

    Thanks.
     
  5. Thread closed - found a workaround

    I never did find out why this would not work in Visual Studio 2010. The program was written in C# Visual Studio 2008. So my workaround was simple: just port to a website that runs ASP.NET 3.5 and below (i.e., Visual Studio 2008).

    Oh well, perhaps a step down, but at least it works now.
     
  6. Explanation is of much help for me, PJ2010, thnx for your suggestions!
    ~jimbo
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page