none
vb.NET SQL program won't work on other computers RRS feed

  • Question

  • I developed an application in vb.NET Express that will be used to run a chess club ladder for multiple schools.  I'm using an SQL database to store the data, and some of my controls use databindings to interact with the database.

    The program works fine on the computer I'm using to develop it, but when I try running it on a different computer it gives me an error saying
    "System.Data.SqlClient.SqlException: An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections."

    I thought the problem might be because I'm using the Express version, so I just bought Visual Studio 2005, and now I'm not sure what to do.

    I want the program to be standalone, and easily run on other computers running Windows XP.  The amount of data isn't going to be too big, probably only 100 players max.  Should I be using an SQL database to store the data?  Would an Access database be easier?  Do databinding still work with Access databases?

    Thank you for your help.
    Sunday, June 17, 2007 4:55 AM

All replies

  • Hi,

     

    This problem isn't to do with Visual Studio, it's the database that needs configuring. It has been a while since I've seen that error so hopefully what I type here is accurate. There is a way to configure SQL Server so that it accepts connections from certain locations. By the sounds of things your SQL Server is running on the same machine your developing with and has been set up to accept local connections only. Are you using SQL Server Express?

     

    From your start menu look for SQL Server 2005->Configuration Tools->Surface Area Configuration and start it. You'll see option to configure surface area or configure features, select surface area. Select the Remote Connection node of the instance of SQL Server that your using, if I am correct then the instance has been set to only allow local connections only, set it to accept remote connection and TCP only. Make sure any firewalls have been set up to allow communication on port 1433.

     

    It's one of those problems thats easier to fix sitting at the machine as it depends on how your machines are connected together.

     

    As to Access, data binding still works with Access databases. Databinding works against data sets and data tables, it doesn't matter where or how you get the data into these objects databinding still works. Again I don't know if it would be easier or not it all depends on the project, tell me more about how the system works.

    Sunday, June 17, 2007 3:02 PM