none
visual studio and sql server connection error RRS feed

  • Question

  • hello, here is my problem.

    If I design a website on my computer with a database on my computer. when I bring up the "edit columns" section of a grid view it will show the current column names that are in the database. and if i'm building a select statement I am able to see all the fields in a table.

    however.

    When I work on my website that is on my web server which uses a sql database on my web server while the site works properly. visual studio won't show any of the fields like above and gives a connection error when i try to run a test query. this also happens with my expression web program.

    how do I repair this connection issue

    Thanks 

    Gary

    • Moved by Brittany Behrens Monday, August 9, 2010 11:42 PM (From:Visual Studio Editor)
    Sunday, August 8, 2010 5:19 AM

All replies

  • Hello,

    Can you please provide use more information or paste the connection error message as it is?

    Here is a scenario of sql server connection errors in Visual Studio, hope it could help:
    http://blogs.msdn.com/b/zxue/archive/2010/04/28/fix-sql-server-express-user-instance-connection-error-in-visual-studio-projects.aspx

    Best regards


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    If you have any feedback, please tell us.
    Welcome to the All-In-One Code Framework!
    Wednesday, August 11, 2010 7:52 AM
  • I have recorded the problem with windows 7 problem steps recorder. you can see it here. http://microcrafters.net/Problem.mht be sure to type mht not htm. you can view it in internet explorer. 

    Also the site and server are hosted online so i don't have access to the sql server permissions etc. as they are not on my computer

     

    thanks again

    Gary

    Thursday, August 12, 2010 1:14 AM
  • Hello Gary,

    Thanks for your detail information! That's really helpful!

    The error indicate that Visual Studio could not connect to the database server you specified in the connection string (the connection string could be viewed by clicking the connection string button). You could modify it by openning Web.Config file and modified the connection string there.

    Since your database is on another machine, you need to configure you database to allow remote connection:
    http://support.microsoft.com/kb/914277/en-us

    Best regards


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    If you have any feedback, please tell us.
    Welcome to the All-In-One Code Framework!
    Thursday, August 12, 2010 10:06 AM
  • After double checking my connection string against the one my server says i need they are the same. the website connects to the sql server and works fine. I only have this problem in visual studio and expression web. the only permissions i can change on the server is my password. the only thing i can figure is that it's not set up for remote access. but i don't know how i would go about changing this.
    Friday, August 13, 2010 8:36 PM