0

I am new to developing in VB Windows Forms, I am use to Visual Web Developer Asp.net sites. I am trying to figure out how I can publish or deploy my application to another computer without the other PC's downloading and installing Sql Server Express. What happened was when I ran the setup from the publish on the other PC, it automatically started to download the Sql Server Express since a database is connected to the application.

I Only want the Sql Server to be Installed on My computer, not the others, and for the others to Remote into the database file i guess that is on my computer so that it all gets stored on 1 local PC and so that I don't have to download Sql Server on every PC that I install the program on.

My Sql Server Database File is currently just stored in the main application folder as all of my code files are stored in and my app.Config connection string looks like this..

 <add name="Dispatch.My.MySettings.DispatchConnectionString1"
        connectionString="Data Source=OFFICE-ADMIN-PC;Initial Catalog=DispatchDB; User id=Office-Admin; Integrated Security=True;" providerName="System.Data.SqlClient"/>

I'm not sure if I need to change something in the app.config file or what to do.

user3841709
  • 386
  • 6
  • 28
  • http://stackoverflow.com/q/11278114/1070452 – Ňɏssa Pøngjǣrdenlarp Mar 19 '15 at 19:26
  • Will this solve the problem of when I publish my application and try to run the setup from another PC that it tries to download sql server? Or is this only making it where it can be accessed remotely? – user3841709 Mar 19 '15 at 19:33
  • I really don't have any other code that does anything with the database so I am at a complete loss of what I need to do. Its basically a client application that say 3 computers need to be able to run the application but the database is only stored on one. After following your link when I re-published the application it still tried to install sql server on the other PC – user3841709 Mar 19 '15 at 19:46
  • That happend because of dependency from your project ! >>>". What happened was when I ran the setup from the publish on the other PC, it automatically started to download the Sql Server Express since a database is connected to the application." – CristiC777 Mar 20 '15 at 13:09
  • I have a similar application in Winforms and at the end of setup we have a Window where we set the path of DB (is a network path of course like yours). And we save in registry. So client PC (naming server = the PC wih SQL Server ) get the path from registry at start, and login to DB via network. – CristiC777 Mar 20 '15 at 13:14
  • Ok, I'll look into that and give it a try. Since I am a complete beginner at trying to publish an application that is connected to a sql server database let me ask this, in task manager, under Services, I have noticed that SQLBrowser, SQLAgent$SQLEXPRESS, and SQLSERVERAGENT are not running, they are stopped. Do these need to be running in order for the other PC to be able to connect to my .mdf? – user3841709 Mar 20 '15 at 13:29
  • I think I may have just found out a part of why this could be so difficult. I am using Visual Basic 2010 Express, so if I use the new connection wizard to set up a connection string, I only have the options to choose an Access Database File, Sql Server Compact 3.5, and Sql Server Database File. I don't have an option of anything like SQL Server Database. Which I think is what I want because I want to be able to view and edit the database in SQL Server Management Studio as well, but with the SQL Server Database File option I can't view it in SSMS. – user3841709 Mar 20 '15 at 13:58

0 Answers0