Skip Navigation Links
Home
Forum Home
Latest 50
Unanswered
Win Prizes
All Time Leaders
Jump to CategoryExpand Jump to Category
Login 
    Welcome Guest!
 Search Forum For :  
X
 Login
Please login to submit a new post, reply and edit exiting posts, see user profiles, and access more features. If you are not a registered member, Register here.
User Id / Email:
Password:  
Forgot Password | Forgot UserName
   Home » ADO.NET & Database » Setting Database on LAN Server
       
Author Reply
David Carter
posted 31 posts
since Jul 22, 2010 
from Australia

Setting Database on LAN Server

  Posted on: 29 Aug 2010       

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
 
 
 
Carter's Law of Productivity. "The amount of work a person does is inversely proportional to the number of suggestions they offer." - David J Carter
Abhimanyu Kumar Vatsa
posted  577 posts
since  May 01, 2010 
from 

 Re: Setting Database on LAN Server
  Posted on: 01 Sep 2010        0  
i hv not worked on such but i think you should try this


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
ADCA BCA  MINDCRACKER MVP
Website : http://www.itorian.com 
http://www.microsoftskill.in/
Abhimanyu Kumar Vatsa
posted  577 posts
since  May 01, 2010 
from 

 Re: Setting Database on LAN Server
  Posted on: 01 Sep 2010   Accepted Answer     0  
Please read this articles

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
ADCA BCA  MINDCRACKER MVP
Website : http://www.itorian.com 
http://www.microsoftskill.in/
David Carter
posted  31 posts
since  Jul 22, 2010 
from  Australia

 Re: Setting Database on LAN Server
  Posted on: 01 Sep 2010        0  

Thanks Abhi,
I'll give these a try and let you know how I get on.
David
 
Carter's Law of Productivity. "The amount of work a person does is inversely proportional to the number of suggestions they offer." - David J Carter
David Carter
posted  31 posts
since  Jul 22, 2010 
from  Australia

 Re: Setting Database on LAN Server
  Posted on: 01 Sep 2010        0  


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.
 
 
Carter's Law of Productivity. "The amount of work a person does is inversely proportional to the number of suggestions they offer." - David J Carter
       
Top Articles
View all »
6 Months Free & No Setup Fees ASP.NET Hosting!
Dynamic PDF
ceTE software specializes in components for dynamic PDF generation and manipulation. The DynamicPDF™ product line allows you to dynamically generate PDF documents, merge PDF documents and new content to existing PDF documents from within your applications. Visit DynamicPDF here
Discover the top 5 tips for understanding .NET Interop
Ricky Leeks presents the top 5 tips for understanding .NET Interoperability. Learn more.
Introducing MaxV - one click. infinite control. Hyper-V Hosting from MaximumASP.
Finally – a virtual platform that delivers next-generation Windows Server 2008 Hyper-V virtualization technology from a managed hosting partner you can truly depend on. Visit www.maximumasp.com/max for a FREE 30 day trial. Hurry offer ends soon. Climb aboard the MaxV platform and take advantage of High Availability, Intelligent Monitoring, Recurrent Backups, and Scalability – with no hassle or hidden fees. As a managed hosting partner focused solely on Microsoft technologies since 2000, MaximumASP is uniquely qualified to provide the superior support that our business is built on. Unparalleled expertise with Microsoft technologies lead to working directly with Microsoft as first to offer IIS 7 and SQL 2008 betas in a hosted environment; partnering in the Go Live Program for Hyper-V; and product co-launches built on WS 2008 with Hyper-V technology.
Nevron Chart for .NET 2010.1 Now Available
The leading .NET charting control now features PDF, Flash and Silverlight export, visualization of large datasets and more. Deliver true charting functionality to your BI, Scorecard, Presentation or Scientific apps. Download evaluation now.
ASP.NET 4 Hosting
Get 2 Months Free of ASP.NET Hosting for Only $4.95/month! Receive FREE MS SQL and MySQL Databases Including ASP.NET 4/3.5, MVC 3.0, Silverlight 4, Windows 2008/IIS 7.0 Plus FREE IIS 7 Modules. Host UNLIMITED ASP.NET Web Sites – Click Here!
6 Months Free & No Setup Fees ASP.NET Hosting!
 Hosted by MaximumASP  |  Found a broken link?  |  Contact Us  |  Terms & conditions  |  Privacy Policy  |  Site Map  |  Advertise with us
Current Version: 5.2011.3.12
 © 1999 - 2012  Mindcracker LLC. All Rights Reserved