My database program works well on individual computers but I want to have it installed on a LAN server for all users to be able to access, or at least the database file should be on the LAN and common to all computers.
It is just a simple VB program with a datagridview filled from TestDatabase.mdb
I have Published the program files on my LAN at My Network Places\SharedDocs on computer_1\Test Database\
And copied the mdb file to that folder.
Unfortunately Form1.designer.vb sets the following code:
'OleDbConnection1
Me.OleDbConnection1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=""C:\Documents and Settings\All Users\Documents\Test Database\TestDatabase.mdb"""
Each computer can access the files but they all need to have the program installed using the setup file.
Because it is a shared folder I thought that alll computers on the LAN would look to the common folder but instead they look to their own folder named C:\Documents and Settings\All Users\Documents\.
During setup, I need the source to be set at the LAN server so all computers look to the same mdb file sitting there, not the copy sitting on their own computer.
Any ideas folks?
Regards,
David
Loading

Abhimanyu K VatsaPosted Sep 1, 2010, 11:02 AM
http://office.microsoft.com/en-us/access-help/ways-to-share-an-access-database-HA010279159.aspx
http://www.access-experts.com/default.aspx?selection=TutorialSplitDB&sm=18
David CarterPosted Sep 1, 2010, 8:32 PM
Hi Abhi,
The following code, typed into the sub Form1_Load, worked.
Me.OleDbConnection1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=""\\Carter_2\Test Database\TestDatabase.mdb"""
I made sure the folder 'Test Database' was shared by all.on the LAN.
I'm using Windows XP, so Vista and Windows 7 procedures might be different.
I opened the folder 'Shared Docs on (Carter_2)', then right clicked on the folder 'Test Database' and selected Properties.
Under the Sharing tab I had to tick "Share this Folder on the network" and "Allow network users to change my files".
Working perfectly now,
Thank you, mate.
David CarterPosted Sep 1, 2010, 7:39 PM
I'll give these a try and let you know how I get on.
David
Abhimanyu K VatsaPosted Sep 1, 2010, 11:00 AM
Me.OleDbConnection1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=""\\computer_name_on_lan\C:\Documents and Settings\All Users\Documents\Test Database\TestDatabase.mdb"""
Remember: C drive should be shared with full access so that network user can edit it.
I have not tried such project coz I don't have network on my home. i only have 1 pc. very funny....
thanks