Concurrent access to MS Access database - ms-access

I have an access database/forms, controlled by VBA. Records can be deleted/modified and added. What is the best/natural way to share this database within only 3 desktop PCs? Would network share from one of the PCs would be sufficient and automatically taken care by MS Access? What additional actions in VBA I have to take care of? I'm mostly using CurrentDb.Execute to add/update and delete.

Split the data and application into separate databases
Compile the application potion into an .mde (or equiv in 2007) to keep your users from messing with it, and put it on a share (or you can distribute it to each machine if you need performance).
Put the data db on a network share.
Ob. MS SQL Plug- better yet, convert the data db from MS Access into MS-SQL, and host it on a server and save your self some future pain, because with multiple users, MS Access is known to corrupt its own database from time to time. Even 2007.

Related

ACCESS: Move Data --> Access Database keeps wanting to split

I have an ACCESS database that I'm using to test migration to SQL Server. It has one local table; no linked tables, forms, queries, or reports. One site said to use the open the Database Tools tab, and click the Access Database icon in the Move Data group. When I do, it tells me that the database must be split. How do I let ACCESS know that the database has been split?
The move data features up to Access 2010 ALSO had a feature to move data to SQL server. However, due to SQL server always changing and having new versions that come out at "different" times then ms-access?
the feature was deprecated, and versions of Access after 2010 don't have the move to sql server anymore.
If this is just say a simple single table, then it you can use SQL server studio to import the table. (but, you lose PK settings, and indexing, and relationships (assumes you have more then one table and related tables).
If you looking to migrate a lot of data, and a lot of tables?
Then it is high recommended that you use the Sql Server Migration Assistant for Access. (SSMAA).
It is a separate download. You can find SSMAA here:
Information on this tool, and download links can be found here:
https://learn.microsoft.com/en-us/sql/ssma/access/sql-server-migration-assistant-for-access-accesstosql?view=sql-server-ver16
While the tool has a learning curve, it is well worth the efforts for any type of serious data migration from Access to SQL server.

Using MS Access Database Across Network Share

We have a database with a fairly large table (300+k rows) that needs to be shared by a very small group of people (less than 5).
We previously attempted to have the table shared through Access Web Database (SharePoint 2010, so this was using SharePoint lists), but this quickly became a nightmare scenario as our morning process to load a daily inventory report into this table ran for 3+ hours using SharePoint once the inventory became significantly high. We have reverted to sharing the reports database across a network share, and the person who needs this inventory data for a different job function uses a separate front-end.
The issue we have is that when the one guy has his separate front-end open, which links to one table in the reports database, no one else can connect to the reports database; not even for read-only access.
What can be done to allow proper multi-user access? I've checked every record locking property I can think of, and still can't make anything work.
(I have to say that there are no viable alternatives to this setup. Even though we recently upgraded to SharePoint 2016 / Office 365, IT refuses to upgrade Access Web Services; so we won't have any access to SQL server, period.)
The report property sheet has a setting to lock, or not lock the table. simply change that setting, and other users can then edit data, or view the report.

Access loses table relationships when

I need to update an MS Access app that connects to a SQL Server database. I copied the app and SQL database to my development computer, opened Access and linked the tables (100+ of them). I can see the data via Access, but all of the table relationships are lost, and the forms are giving me 3146 connection errors.
How do I straighten out the data so I can add features to the app (and eventually give the app to the client to reconnect with the original SQL Server)?
Complication: I haven't used Access in 15 years, so I'm a little rusty with it...
The relationships are NOW handled by SQL server. They have ZERO to do with Access, or a web site, or VB6, or some .net program that simply connects to SQL server. The .net program, the VB6 program, or the software you develop using MS Access has zero to do with how the relationships are setup with the given database system (in this case SQL server).
So that web site software, or .net program, or even MS Access does not change, or control the relationships you setup on SQL server. If this were the case, then which of the programs such as .net, web site, VB6, and MS access all using the SQL server at the SAME TIME would control relationships then??
So it is not possible or practical to have the client software control or set the relationships used by SQL server, since then it would be the client software controlling this, and every program that connects to SQL server could then be different!!! (and thus no enforced relationships would be possible as all programs would have differing ideas as to how the relationships are supposed to be!!!).
Any relationships settings you have in Access are thus ignored by SQL server, since it is now SQL server that is managing the database – not Access.
Access is just a developer’s tool like VB6, or say vb.net – those programs are free to connect to SQL server. Since many different programs are able to connect to SQL server, then the programs connecting are not the ones that control relationships – it all has to be done and set on SQL server.
Access will still allow you to use the relationships diagram. You can thus still draw out relationships in that window if you want, but you note how the options to “enforce” the relationships are now gray out – they can’t be used. So it still can be a documentation tool, or a means to make a cute diagram, but as such, it will not affect the operation of SQL server.
As for you errors? Well, before you attempt to open any form, you want to click on a linked table, and see if that works first. No use to try code, forms, reports if you not FIRST sure that the table links are active and working. ONLY until such time that you can click on, and open a linked table should you be concerned with trying to use forms, code, reports etc.
I would suggest you use the linked table manager, and re-link the tables. Now, I suppose you could delete the links, but I do NOT recommend that as a first try, since the table names will likely have a dbo prefix in front of them, and this will result in all your table names being changed, and that will break near everything in your application. So really try the refresh approach, since if you have lots of tables, then you have to re-name them all if you delete the links and re-link (so try to avoid my suggesting to delete the table links and recreating them – it will save a lot of work).
So first step:
Make sure the table links works. (don’t try code, don’t try forms, don’t try reports).
You need to ensure that a simple linked table works, and that you can simply open these linked tables. Skipping this step means everything else you attempt is folly and a waste of time.
So click on a linked table and see if you can then open + view that linked table data.
If not?
Then I would launch the linked table manager, and select all linked tables, and then force a re-fresh. (make sure you click on the box to [x] “Always prompt for new location” in the lower left corner of the linked table manager.

Embed MS Access Form To Website Oline

I have a website online with just HTML and I am not willing to use any other programming language apart from Javascript. All I need to do is connect my Microsoft Access database on my computer to a form hosted online so when information is submitted online it is updated on MS access the next time I open the file up. Is this possible and how can it be done?
Turns out, you can do this with zero code. If you use office 365, and publish an Access web forms.
Any information entered into the Access web form will automatic appear in your local database. The synchronizing of data from the web site and pulling down of the records to a local copy works automatic and without the need to write any code. In fact the sync starts automatic when you launch the client application. (it runs in disconnected mode). And any records you enter in the client application will also sync up and appear on the web site.
So, you can use Access and write zero code, and this two way sync feature is built in.
You need Access 2010, and either SharePoint 2010 (enterprise), or you can use office 365 and the $6 per month p1 plan which also does support Access web publishing.
However, I suspect issues of user logons and security may well be a greater issue here, and thus office 365 might not be correct from a user logon point of view. You can invite up to 50 users to that site for the basic $6 per month, but all users of the site will require a logon (which can be due to being invited to the site).
There are two videos of mine here showing this setup in action here:
http://www.youtube.com/playlist?list=PL27E956A1537FE1C5&feature=plcp
I think what you are trying to do is very impractical. You'll need to use Server Side Javascript to insert your data into a database, preferably SQL Server, and then you'll have to write some kind of code to sync the SQL Server Database to your Access database.
Alternately, you could setup your Access database so it connects to the same instance of SQL Server as your website using ODBC linked tables or ADO. I cannot really recommend this, especially if the data you have in your Access database is anything you wouldn't want to be public. Also, using MS Access to access a database across the WAN/Internet is really not recommended although it can certainly be done, as long as you aren't working with large amounts of data, large quantity of records, etc.
I am not willing to use any other programming language apart from Javascript.
And why aren't you willing to use something else? I don't think you're going to get anywhere if you don't open your mind to using the right tools for the right job.
Here's something that might help you get connected to SQL from Javascript:
How to connect to SQL Server database from JavaScript in the browser?

MS Access DB on network with multiple users

I have an MS Access database on a network drive with a userform which has multiple users (All using at the same time)
The form runs an update-query which will add data into a raw data table.
Does anybody know how I can make this work if two(or more) users run the update query at the same time? I assume this has to be done using temporary tables...
Thanks,
James
Just to add some pages from my website to this discussion.
You want to split the MDB into a Front End MDB containing the queries, forms, reports, macros and modules with just the tables and relationships in the Back End MDB. The FE is copied to each network users computer. The FE MDB is linked to the tables in the back end MDB which resides on a server. You make updates to the FE MDB and distribute them to the users, likely as an MDE.
See the "Splitting your app into a front end and back end Tips" page for more info. See the free Auto FE Updater utility to make the distribution of new FEs relatively painless.. The utility also supports Terminal Server/Citrix quite nicely. Also visit my Access Performance FAQ page.
Access does not behave well if the entire database (front end forms plus backend database) is accessed by several users from a network share.
Try splitting into a front end (one on each client machine) and a single backend (tables) on the network share, and use linked tables in the front-end.
How to manually split a Access database in Microsoft Access
Information about query performance in an Access database
Microsoft Access Performance Tips to Speed up Your Access Databases
Tony Toews' Microsoft Access Performance FAQ is well worth reading.