Problem in connecting with SQL database on client machine
-
hi, I was not sure whether to post this message in database forum or C#, plz guide. I have developed a simple database application which reads records from table and displays them in grid, it runs fine on my system but when I try to run it on client's machine it either gives exception or just crashes. It seems that there is some issue in connection string but I have not been able to identify.. here's some information: Connection String: Data Source=.\SQLEXPRESS;AttachDbFilename=D:\dev\POS\POS\bin\Release\POS_DB.mdf;Integrated Security=True;User Instance=True;Connect Timeout=200 Exception: "The timeout period elapsed prior to completion of the operation or the server is not responding." I have tried many things but nothing worked, any kind of help will be appreciated. Thanks, Regards, Affan Ahmad Toor
.................. QUAIDIAN FOR ONCE, QUAIDIAN FOR EVER!
-
hi, I was not sure whether to post this message in database forum or C#, plz guide. I have developed a simple database application which reads records from table and displays them in grid, it runs fine on my system but when I try to run it on client's machine it either gives exception or just crashes. It seems that there is some issue in connection string but I have not been able to identify.. here's some information: Connection String: Data Source=.\SQLEXPRESS;AttachDbFilename=D:\dev\POS\POS\bin\Release\POS_DB.mdf;Integrated Security=True;User Instance=True;Connect Timeout=200 Exception: "The timeout period elapsed prior to completion of the operation or the server is not responding." I have tried many things but nothing worked, any kind of help will be appreciated. Thanks, Regards, Affan Ahmad Toor
.................. QUAIDIAN FOR ONCE, QUAIDIAN FOR EVER!
Things that occur to me. I'm sure that you will have checked them anyway, but it does no harm to have a reminder. 1) is the SqlExpress on the clients machine running? 2) was it installed with the same settings as the one on your machine? 3) unlikely, but is the path correct? (you should get a different error, if so, but worth checking) If I think of any others I'll post again.
Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.”
-
Things that occur to me. I'm sure that you will have checked them anyway, but it does no harm to have a reminder. 1) is the SqlExpress on the clients machine running? 2) was it installed with the same settings as the one on your machine? 3) unlikely, but is the path correct? (you should get a different error, if so, but worth checking) If I think of any others I'll post again.
Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.”
hi Henry, thanks for reply. i dint knew that SQL Express should be installed on client machine. I havnt installed it on client machine, i will try it. Can you please elaborate how can I install SQL Express having same setting? Thanks, Regards, Affan Ahmad Toor
.................. QUAIDIAN FOR ONCE, QUAIDIAN FOR EVER!
-
hi Henry, thanks for reply. i dint knew that SQL Express should be installed on client machine. I havnt installed it on client machine, i will try it. Can you please elaborate how can I install SQL Express having same setting? Thanks, Regards, Affan Ahmad Toor
.................. QUAIDIAN FOR ONCE, QUAIDIAN FOR EVER!
For the application to run on the clients machine, it must have access to an Sql Server instance. If one is already there, either on the machine or on the network, then simply change the '.\SQLEXPRESS' part of your connection string to the name of that Sql Server. If not, then install SqlExpress. The biggest problem you will have is to remember the settings you used on your own machine. :) Unless you can remember exactly how you did it, just go for the defaults and try it. Don't forget to copy the *.mdf and *.ldf files, unless your application creates them or the installer does it for you. Good luck! :)
Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.”