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
Posts
-
C# and SQL deployment issue -
Help with webBrowser control resource useGood Day! I just have a problem that I would want to be addressed. This is with regards to using multiple webBrowser controls. As you can see, when I use multiple webBrowser controls, they tend to hang the application for a while. I think this is a threading issue, but I am new to multithreading as well so I am looking for an easier way to fix this if possible. If not, please guide me on how I can fix this, so the webBrowser controls wont hang the application since it is important in my application to let the users manipulate the form while the webBrowser controls are running. Any ideas? Any help will be greatly appreciated, thanx!
-
SQL DB error: timeout problemHello experts! I am puzzled with this problem in using c# to communicate with an SQL database. Whenever I run the application for the first time, I always receive an exception error saying that the timeout period has expired in trying to connect to the database. When I run the application for the second time (and all succeeding times), the application connects instantly with no problem. Why is my application unable to connect to the database when its in the first time? It would be too lengthy to post my code here so I am just expecting a general answer. I might be missing something simple here. Thanks a lot.
-
Invoking "click" event on buttons using webBrowserHi! I am currently doing a project that involves automated logging-in on web accounts. I used the webBrowser control for this purpose and so far everything is working fine. However, the method I use is: webBrowser1.Document.GetElementById("btnSubmitURL").InvokeMember("click"); The problem comes in when the button elements do not have name or id properties. Is there a way to invoke the click event without knowing the name or id of the button element? The only other method I know is GetElementFromPoint(), but it would be good if there is another way since this method requires knowledge on the coordinates of the button. Thanks everyone.
-
Regarding the WebBrowser Class/Control in C#I got it, there was this code: this.Controls.Add(this.webBrowser1) that adds the control to the windows form, All I had to do is comment it out. Thanks for the help!
-
Regarding the WebBrowser Class/Control in C#My first intuition was to set the visibility to false, but then it turns out that doing so disables the whole control and thus the rest of my code wont work. What do you mean by "You could instantiate it, but not add it to the Controls collection"? Btw, I tried to instantiate it instead of adding it the control from the designer by the code: webBrowser webBrowser1 = new webBrowser(); However, it didn't work in this manner. I also can't seem to find a property that would let it not display. I also have a code using HttpWebRequest and HttpWebResponse, but its a lot longer and I don't know how to send multiple posts and how to activate a button click...
-
Regarding the WebBrowser Class/Control in C#Hi guys! I'm new to network programming so i'm sorry if this question is a little noobish. I started using the WebBrowser Control in c# and so far it has done my purpose. But I want to know if there is a way to utilize this same control (so I won't change my code) without the visual display. Is it possible to "hide" the control but letting it stay active? Or is there a usable base class where the WebBrowser inherits its properties and methods? Thank you guys!