C# and SQL deployment issue
-
Hi! I am new to programming with SQL so I really need help on this one. After I finish an application with no errors or bugs, i tried to launch it in different computers. However, most computers encouter SQL errors while loading the application, either a timeout error or the application simply crashes due to the inability to load the data from an SQL database. My questions are the following: 1. Do you need an SQL server running in the computer where you will deploy the application? Though in some computers, the application worked even though they do not have an SQL Server. 2. Should I modify something in the connection string when I am already deploying the software? Is there a difference in the connection string when the program is running in my computer and in other computers? My connection string is this: "Data Source=.\\SQLEXPRESS;AttachDbFilename=|DataDirectory|\\MyDatabase.mdf;Integrated Security=True;User Instance=True"; I tried modifying the timeout but the error still remains. 3. Where could I have missed something? Sorry if I am missing something trivial here. Thanks in advance for those who will respond! You'll really be helping me a lot. Thanx!
-
Hi! I am new to programming with SQL so I really need help on this one. After I finish an application with no errors or bugs, i tried to launch it in different computers. However, most computers encouter SQL errors while loading the application, either a timeout error or the application simply crashes due to the inability to load the data from an SQL database. My questions are the following: 1. Do you need an SQL server running in the computer where you will deploy the application? Though in some computers, the application worked even though they do not have an SQL Server. 2. Should I modify something in the connection string when I am already deploying the software? Is there a difference in the connection string when the program is running in my computer and in other computers? My connection string is this: "Data Source=.\\SQLEXPRESS;AttachDbFilename=|DataDirectory|\\MyDatabase.mdf;Integrated Security=True;User Instance=True"; I tried modifying the timeout but the error still remains. 3. Where could I have missed something? Sorry if I am missing something trivial here. Thanks in advance for those who will respond! You'll really be helping me a lot. Thanx!
labdakos wrote:
Integrated Security=True
I would start by looking at the integrated security. When set to true the currently logged in windows user account will be used to try to access the server. If you haven't given the individual accounts permission to the database security could be stopping you. You could fix this by setting the integrated security to false and then specifying a specific SQL UserID and password.
Latest toy built for fun: Web Lens Best feature: Full size images when using Google image search.
-
Hi! I am new to programming with SQL so I really need help on this one. After I finish an application with no errors or bugs, i tried to launch it in different computers. However, most computers encouter SQL errors while loading the application, either a timeout error or the application simply crashes due to the inability to load the data from an SQL database. My questions are the following: 1. Do you need an SQL server running in the computer where you will deploy the application? Though in some computers, the application worked even though they do not have an SQL Server. 2. Should I modify something in the connection string when I am already deploying the software? Is there a difference in the connection string when the program is running in my computer and in other computers? My connection string is this: "Data Source=.\\SQLEXPRESS;AttachDbFilename=|DataDirectory|\\MyDatabase.mdf;Integrated Security=True;User Instance=True"; I tried modifying the timeout but the error still remains. 3. Where could I have missed something? Sorry if I am missing something trivial here. Thanks in advance for those who will respond! You'll really be helping me a lot. Thanx!
Also doesn't look like you are specifying your server name in the connection string. SQL will only have to be installed on your server but the other machines need to know where that is. This is a pretty good primer on connection strings: http://www.connectionstrings.com/sql-server-2005[^]
Latest toy built for fun: Web Lens Best feature: Full size images when using Google image search.