We're a community of 1.1M IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,080,561 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

Runtime error

using System.Collections.Generic;
using System.Windows.Forms;

namespace LandTransfer
{
    static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        public static int code = 0;
        //C:/LandTransfer/Database/
        public static string database = "//192.168.1.24/LandTransfer/Database/LTMS.mdb";
        public static string source = "Provider = Microsoft.Jet.OLEDB.4.0;Data Source=" + database + "";
        [STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new Parent());
        }
    }
}

I am trying to export data to onother compuer database having in network, error "the programme is being used by onother user exclusivly or you have no permission" The programme is same but i want that two person on different computer can work at the same time, and the data should be stored in one computer. I am giving my programme coding ---------

3
Contributors
2
Replies
2 Days
Discussion Span
5 Months Ago
Last Updated
4
Views
Lalit Verma
Newbie Poster
1 post since Dec 2012
Reputation Points: 0
Solved Threads: 0
Skill Endorsements: 0

Access databases can only be open by one user at a time.

It would be wise to open a connection , read all data, then close the connection.

Begginnerdev
Practically a Posting Shark
893 posts since Apr 2010
Reputation Points: 198
Solved Threads: 149
Skill Endorsements: 9

On the computer '192.168.1.24' should exist a shared folder published as 'LandTransfer'.
When you share the folder, go to the advanced share options, and set the share permission to full for every.

If the computer '192.168.1.24' belongs to an Active Directory Domain, and yours also, to the same domain, then on the '192.168.1.24' computer you must give permissions to domain users to the folder to modify (not to the share). Otherwise, if both computers are stand-alone (not acive directory integrated) you must create a network unit( S: or what else is free) , pointin to the share in '192.168.1.24' and supply the user credentials using the computername\username and the passwor for an existing user in the '192.168.1.24' computer. In this case, you must change your connection string to "S:/Database/LTMS.mdb".
Alsu you'll need to give local modify permissions to the folder for the username credential you used. (see this KB)

@begginerdev: An Access db can be acessed from many users at same time. See this article.

hope this helps

lolafuertes
Practically a Posting Shark
895 posts since Oct 2008
Reputation Points: 164
Solved Threads: 189
Skill Endorsements: 5

This article has been dead for over three months: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
 
© 2013 DaniWeb® LLC
Page generated in 0.0820 seconds using 2.73MB