-
Mar 8th, 2016, 08:55 AM
#1
Thread Starter
New Member
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
-
Mar 8th, 2016, 10:17 AM
#2
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
-
Mar 9th, 2016, 01:40 AM
#3
Thread Starter
New Member
Re: SQL Database on multiple pc's
Originally Posted by GaryMazzone
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.
-
Mar 9th, 2016, 03:16 AM
#4
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|