Results 1 to 4 of 4

Thread: SQL Database on multiple pc's

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2016
    Posts
    8

    Question SQL Database on multiple pc's

    Hi!

    I'm working on a project where we want to keep track of materials in a warehouse.
    The idea is that the same program can be used on multiple pc's in the company, so the parent folder is installed on the O:\ drive. (Wich can be accessed by all the PC's)
    All the PC's can install the application from that location but when a change is made in the Data Base it is only visible on the PC that made the change.
    Does anyone know how I can fix this?

    I tried fixing it with Microsoft SQL management Studio, but I can't find or add the drive as a SQL server so that didn't work.

    Many Thanks in Advance =D

  2. #2
    A SQL Server fool GaryMazzone's Avatar
    Join Date
    Aug 2005
    Location
    Dover,NH
    Posts
    7,495

    Re: SQL Database on multiple pc's

    Where is the SQL Server at? It needs to be running on a server that all the systems can see. It should not be an express edition and should not be attached database.
    Sometimes the Programmer
    Sometimes the DBA

    Mazz1

  3. #3

    Thread Starter
    New Member
    Join Date
    Mar 2016
    Posts
    8

    Re: SQL Database on multiple pc's

    Quote Originally Posted by GaryMazzone View Post
    Where is the SQL Server at? It needs to be running on a server that all the systems can see. It should not be an express edition and should not be attached database.
    I made a .mdf file via VB and connected this to my project. The .mdf file is in the main folder located in the O:\ drive.

  4. #4
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    110,299

    Re: SQL Database on multiple pc's

    If you deploy an MDF file with your application then it is a local data file, i.e. it applies only to the app on the machine it's installed on. If you want multiple clients to access a single database then you don't deploy an MDF file with the application. You add a database to a SQL Server instance somewhere and then every client connects to that one database.

    There are a number of ways to create the database. You can start with an existing MDF file and attach it in Management Studio, although I've had issues doing that before. What I generally do is create the database itself in Management Studio and then create the schema either by running a script or restoring a backup. Both the script and the backup can be generated by you in Management Studio on your development system.

    The good news is that, if you have done the right thing and stored your connection string in the config file, you won't have to make any changes to your application. Once the common database is in place, you can simply edit the connection string in each deployed config file and it will just work.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width