There is an application which is running on several machines(say roughly on 2).This application updates an shared mdb placed on network.Both users are trying to update the shared mdb at one time but the problem is only one user is able to update mdb at one time.Another user is not able to open it.Can anyone suggest that access support multiuser environment?
edit:
There is one form TFormRoadAttrib.When it activates following function is called
procedure TFrmRoadAttrib.FormActivate(Sender: TObject);
if dmTimeDomain <> nil then
begin
if not (dmTimeDomain.dbTimeDomain.InTransaction) then
begin
dmTimeDomain.dbTimeDomain.BeginTrans;
end;
end;
where dbTimeDomain=TADOConnection and its value is
'Provider=Microsoft.ACE.OLEDB.12.0;
Mode=Share Deny None;
Extended Properties="";
Locale Identifier=1033;
Jet OLEDB:Registry Path="";
Jet OLEDB:Database Password="";
Jet OLEDB:Engine Type=4;
Jet OLEDB:Database Locking Mode=0;
Jet OLEDB:Global Partial Bulk Ops=2;
Jet OLEDB:Global Bulk Transactions=1;
Jet OLEDB:New Database Password="";
Jet OLEDB:Create System Database=False;
Jet OLEDB:Encrypt Database=False;
Jet OLEDB:Don't Copy Locale on Compact=False;
Jet OLEDB:Compact Without Replica Repair=False;
Jet OLEDB:SFP=False;
Data Source=Q:\BEL_01\BEL_GADM\ACCESS\Restrictions.mdb;
Jet OLEDB:System database=C:\Program Files\Tele Atlas\Common Files\DPT.MDW;
User ID=dbadpt;
Password=dbadpt;
When we click on Ok button following code executes
if dmTimeDomain <> nil then
begin
if (dmTimeDomain.dbTimeDomain.InTransaction) then
dmTimeDomain.dbTimeDomain.CommitTrans;
end;
end;
Kindly suggest.
Access definitely supports a multi-user environment, but your permissions must be set correctly. All users must be able to create files in the directory where the database is located, and all users must have permission to modify files created in that directory by other users. There are many ways to mess that up. This is because Access uses a separate .ldb file as part of its mechanism for managing concurrent, multi-user access.
A good test is to have one user create a text file in the shared directory, and then make sure the other user can open that file, and then save a change to it.
Both should be able to use the app. If one user is editing a form or table, the others are locked out of editing those same objects. But that should have no bearing on the app once it's in "production" state. A few years ago I helped convert a large app to MS SQL Server backend (stil MS Access frontend) and until that point, they had been successfully using the app with 15 users simultaneously. The app just got too big (100 forms, 100 tables, some with a million rows) so they moved for performance reasons. Otherwise they'd still be totally on Access.
Consider using an Access Project (adp extension) instead of a normal access mdb file. An access project works with SQL server desktop engine which you will find as a separate install file on you Office CD. This essentially means you have a slightly watered down version of SQL server running and this server will take care of all your concurrency issues for you. Also, if your DB becomes too big for an Access Project, you can easily port your DB to a fully fledged SQL Server machine. You can do most of the things in an Access Project that you can do with SQL Server, including Stored Procedures etc, and it's pretty easy to setup and connect to.
Related
I have a small test application, made with Delphi 10.3.1 as an Stand Alone HTTPSYS Intraweb service. It has an ADOConnection and a ADOTable and in FormShow of unit1, I open the connection, and the table and reads the first 10 rows and add them to a listbox. Just to see that it works and is possible.
When running the application as a Stand Alone HTTPSYS, vith visual GUI, it's working nicely, but when I compile it as a service, and install it, on the sql server, or on the development machine, it fails with access Violation, trying to open the table. I suppose it is an Authentication problem.
I have tried to open connection with both Windows Auth, and with a specific SQL login, and I have tried running the service with both local system (default) and with the specific SQL account.
What am I missing ?
The Specific SQL login, works in SSMS. I'm able to use it to login and access my tables.
Also, if I create the application as a DLL and put it on my IIS10, it works fine.
You are right. It has nothing to do with authentication.
For the IntraWeb HttpSys Stand Alone program to run as a service, the ServerController.ComInitialization property must be set to ciMultiThreaded.
Thanks for your comment which lead me to look elsewhere. You do deserve the credit.
Regards
Soren
I have a problem in terms on connecting my DbLogSystem.mdb to my program.
1) When I try to insert/update a record using the program, it will proceed and perform successfully,
2) When I try to reset/delete all the records using MS Access it will proceed,
But when I Run my program the data/records are still existing.
What is the possible error?
Thanks in advance.
Below is the connection string that might cause the problem:
mydir := GetCurrentDir;
ADOConnection_get_data.ConnectionString:= 'Provider=Microsoft.Jet.OLEDB.4.0;Jet OLEDB:Database Password=puzzle33;Data Source='+ mydir +'\DbLogSystem.mdb;Persist Security Info=False';
or is there any method to link my .Exe program to my Database with the same path folder?
I believe you could just use a relative path to always link your .exe program with the database on the same folder
ADOConnection_get_data.ConnectionString:= 'Provider=Microsoft.Jet.OLEDB.4.0;Jet OLEDB:Database Password=puzzle33;Data Source=.\DbLogSystem.mdb;Persist Security Info=False'
As Zam says, check that you aren't alternating with two different database at the Release and Debug folders.
Also, are you sure you are commiting your changes ?. You may be using CommitUpdates (so your changes never really arrive to the database), or you may have an active transaction that you never commit (so it's rollbacked when you exit your application).
I want read data from MS Access on 192.168.1.203 from SQL Server 2008 on 192.168.100.202 using OPENDatasource.
I get this error:
The Microsoft Jet database engine cannot open the file '\192.168.1.203\Time Attendance System 4.3.1.25\sample\HITFPTA.mdb'. It is already opened exclusively by another user, or you need permission to view its data."
Please help me fix this, friend.
It's likely an issue with folder permissions. In order to share a Jet database, all users must have read/write permissions on the folder where the .MDB file exists. That's because the first user to connect to the database creates a locking file (.LDB) and subsequent users must be able to write to that locking file. (When the last user disconnects, Access will try to delete the locking file, but it's actually not essential that users have Delete permission on the folder).
Can anyone help me in setting up ZeosLib 7.1.4a to connect to Oracle 11g Release 2 Standard database.
Currently we are using Delphi XE2, oracle is installed and the tnsnames.ora file specifies the connections to our different servers and databases, and it is also set up within BDE.
We need to move away from BDE components as they are no longer available with Delphi XE3 and upwards. We use Direct Oracle Access components, but that is a paid 3rd party software, that is why we want to move over to ZeosLib.
What settings need to be set on the ZConnection component in order for it to connect to the oracle database, as there is a Database parameter and LibraryLocation parameter that are looking for actual files, and then there is the HostName parameter?
I never used Oracle, but I don't think it should be too different from Firebird, MySQL, SQL Server and others I've tried on Zeos.
The properties you need to set are:
Protocol = oracle;
HostName = your database server ip is probably your best bet; maybe you don't need this for oracle due to tnsnames... try leaving it empty
Database = your database name. This could be a filename (in the server) or a database alias;
User = User name to connect to the database;
Password = well, the password...
LibraryLocation is the location of the client-side library (a dll) to use for the connection. Normally you don't need to set this property if your library is installed to your system folder or comes along with your executable.
You may also need to set the Port if it's not the default one.
Built an app locally with an EF code-first database - not sure how to upload it to a shared hosting environment such as GoDaddy. It makes sense that something would be amiss because on the shared hosting your code can't just go create a database, but on the flip side I can't find anything to copy the CREATE sql and create it on the server like you would with MySQL
Feel a little silly because I've been using .NET for over a year now but at work the databases are already set up and we have full control over our environments.
If the database has no data that you need to preserve the easiest method is just to install the app on the new host and set the connection string to your new database on the host. On the first attempt to load a page accessing the database, the database will automatically be created (note that you need to load a page which hits the database - sometimes the home page is not sufficient).
This method is a lot more straightforward than generating SQL and then executing it on the production database.
If there is data that you need to preserve then the best method will be taking a backup and installing the backup on the host. In SSMS simply right-click the database in the left pane, then Tools > Backup... To restore on the server connect to the server in SSMS and right-click the 'Database' node in the left panel and select 'Restore Database...' I'm not sure if the host provides a direct connection from SSMS but they should at a minimum have a mechanism to restore a .bak file.
Going forward you should ensure that you can execute SQL on your database as a very convenient method for deploying EF Migrations is to generate the SQL update script on the development server and then deploy this by executing it in production.
Depending on your web host, you may be able to restore the database. If this is an option, simply back up your database on your local machine and restore it on the server via the management console.
You can back up your local database using SQL Server Management Console. This works well even for larger databases as you can directly restore all your data, your schema, etc.
I've had experience with three different hosts so far and all of them have this as an option. You'll usually find this under the Database tab for the web site. The rest from there is up to you because it's usually different across the various hosts.