none
What is the best way for me to deploy my particular application?

    Question

  • Let me start by laying out what I want:

    I have developed an application for the employees at my office. The application is built in VS 2010 using VB.Net and it houses data in an SQL Server Express database (NOT compact). This database is currently on MY computer in my C: drive. I would like to deploy this application so that my coworkers can download it, and use it to update, read, edit, etc. the information in the SQL Server Express database.

    What I did and the result:

    So I used ClickOnce to deploy my application and I published it on my company's server. I installed the app on MY computer and it worked just fine. I tried to install in on a coworker's computer and it gave me an error saying "an attempt to attach an auto-name database for ####.mdf file failed" (### is where the name of my database path is).

    This made me think that the application could not access my database because the database is on MY computer. So I thought, well why don't I put my database on the server. It then gave me this error "the file is on a network path that does not support databases". At this point I am totally lost on how to accomplish what I need to do. I know that the solution is probably easy, because I would think that the situation for use of my application would be fairly commonplace.

    Please help. I will be happy to provide whatever computer, version, etc. info you need.

    Thanks.

    Wednesday, November 17, 2010 4:55 PM

All replies

  • Hello David,

    Please refer to  Restoring SQL Server Express 2008 Database with Click Once on CodeProject and  a MSDN document about Accessing Local and Remote Data in ClickOnce Applications

    More threads talking about the same topic:

    SQLExpress can't attach Database using ClickOnce and ClickOnce application database access and update, see the reply from RobinDotNet.

    Regards,
    Helen Zhou

    This response contains a reference to a third party World Wide Web site. Microsoft is providing this information as a convenience to you. Microsoft does not control these sites and has not tested any software or information found on these sites; therefore, Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. There are inherent dangers in the use of any software found on the Internet, and Microsoft cautions you to make sure that you completely understand the risk before retrieving any software from the Internet.


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
    Thursday, November 18, 2010 3:24 AM
  • Thank you for the assistance. I have read through most of these threads and articles, but unfortunately for me, I understand none of it. I am new to application development in any fashion and have absolutely no understanding of how this works. Which, I am sure just annoys people like you on this site because it makes it much more difficult to help someone like me.

    If you could just try to direct me in the right direction regarding what approach I should be taking to get to my desired result, I will spend the time trying to research and understand it so that I can apply it. I am just lost as to what I need to be doing to solve my problem.

     

    Thanks for your help.

    Thursday, November 18, 2010 2:17 PM
  • So, I have done extensive research on these and other forums, and even tried to bring my IT person in to help me resolve this issue and here is what my basic understanding is:

    1. Visual Studio 2010 Express does not allow applications to connect to a database on a network drive (server).

    2. SQL Server Express 2008? can have a database shared by being placed on a network drive (server). However, it must have Visual Studio Standard Edition 2010 to deploy the application that connects to a database on a network drive (server).

    Question #1: Are both of these statements/understandings correct?

    Question #2: Is there any work around to this problem?

    Question #3: If there is no workaround, what could I use (other than Visual Studio Express or Standard Edition) to rebuild my user interface and program in vb.net. so that I could deploy an application that uses an SQL Server (standard or express) on a network drive (server) so that multiple users of the application share the same database?

     

    Please, please, please help me. I have spent the last few months building an application that works, is exactly what I need, and now I can't deploy it for use in my office.

    Tuesday, November 23, 2010 10:05 PM
  • David,

    Did you resolve your problem?

    I ran into a problem deploying a database app (VS 2010 Express, SQL Server CE 3.5, ClickOnce).  Switching to the latest SQL Server Express, I found that VS 2010 Express did not recognize the SQL Server Express version.

    It seems Microsoft deliberately hamstrings these free tools.

    1) SQL Server Express + VS 2010 Express ==> don't work together; the SQL version is not recognized by VS

    2) SQL Server CE 3.5 + VS 2010 Express + ClickOnce ==> doesn't support redeploying the database without overriding the previously installed database AND ITS CONTENTS without custom scripting

    3) (your case) SQL Server Express 2008 + VS 2010 Express ==> can't handle a database on a network drive

     

    Thanks,

    Cindy

     


    Cindy Rae
    Monday, April 18, 2011 2:02 PM