<p>Two users wanted to share the same database, originally written in MS Access, without conflicting with one another over a single MDB file.</p>

<p>I moved the tables from a simple MS Access database to MySQL using its <a href="http://www.mysql.com/products/tools/migration-toolkit/" rel="noreferrer">Migration Toolkit</a> (which works well, by the way) and set up Access to link to those tables via ODBC.</p>

<p>So far, I've run into the following:</p>

<ul>
<li>You can't insert/update/delete rows in a table without a primary key (no surprise there).</li>
<li>AutoNumber fields in MS Access must be the primary key or they'll just end up as integer columns in MySQL (natch, why wouldn't it be the PK?)</li>
<li>The tables were migrated to MySQL's InnoDB table type, but the Access relationships didn't become MySQL foreign key constraints.</li>
</ul>

<p>Once the database is in use, can I expect any other issues? Particularly when both users are working in the same table?</p>

[{'answer_id': 5847, 'author': 'lomaxx', 'author_id': 493, 'author_profile': 'https://Stackoverflow.com/users/493', 'pm_score': 2, 'selected': False, 'text': '<p>I know this doesn\'t answer your question directly, but it might be worth checking out the <a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=d842f8b4-c914-4ac7-b2f3-d25fff4e24fb&amp;displaylang=en" rel="nofollow noreferrer">SQL Server 2005 migration tool for Access</a>. I\'ve never used the tool, but it might be worth using with SQL Server 2005 Express Edition to see if there are the same issues as you had with MySQL</p>\n'}, {'answer_id': 7891, 'author': 'Gareth Simpson', 'author_id': 147, 'author_profile': 'https://Stackoverflow.com/users/147', 'pm_score': 0, 'selected': False, 'text': "<p>If it's only two users, then Access should do just fine if you put the .mdb on a shared drive.</p>\n\n<p>Have you tried it first rather than just assume it will be a problem. </p>\n\n<p>I believe the recommended max concurrent users for Access is 5 but on occasion I've pushed it past this and never come unstuck.</p>\n\n<p>On the other hand I did once use Access as the front end to MySQL in a single user environment (me).  It was a singularly unpleasant experience, I can't imagine it would become nicer with two users.</p>\n"}, {'answer_id': 8910, 'author': 'BIBD', 'author_id': 685, 'author_profile': 'https://Stackoverflow.com/users/685', 'pm_score': 1, 'selected': False, 'text': "<p>In general, it depends :)</p>\n\n<p>I haven't had a lot of problems when the application side has just been updating the data through the forms. You can get warnings/errors when the same row has been updated by more than one user; but Access seems to be constantly updating its live record sets all the time. </p>\n\n<p>Problems can happen if Alice is already working with record 365, and the Bob updates it, and then Alice tries to update it with her changes. As I recall, Alice will get a cryptic error message. It would be easier for the users if you trap these errors and at least give them a friendlier error message.</p>\n\n<p>I've had more problems when I was editing records in the VB code through RecordSets, especially when combined with editing the same data on forms. That's not necessarily a multi user problem; however, you have almost the same situation because you have one user with multiple connections to the same data.</p>\n"}, {'answer_id': 9200, 'author': 'onnodb', 'author_id': 1037, 'author_profile': 'https://Stackoverflow.com/users/1037', 'pm_score': 5, 'selected': True, 'text': '<p>I had an application that worked likewise: an MS Access frontend to a MySQL backend. It was such a huge pain that I ended up writing a Win32 frontend instead. From the top of my head, I encountered the following problems:</p>\n\n<ul>\n<li>Development of the ODBC link seems to have ceased long ago. There are various different versions floating around --- very confusing. The ODBC link doesn\'t support Unicode/UTF8, and I remember there were other issues with it as well (though some could be overcome by careful configuration).</li>\n<li>You probably want to manually tweak your db schema to make it compatible with MS Access. I see you already found out about the needed surrogate keys (i.e., int primary keys) :-)</li>\n<li>You should keep in mind that you may need to use pass-through queries to do more sophisticated SQL manipulations of the MySQL database.</li>\n<li>Be careful with using lots of VBA, as that tends to corrupt your frontend file. Regularly compressing the database (using main menu, Tools | Database utilities | Compress and restore, or something like that --- I\'m using the Dutch version) and making <em>lots</em> of backups is necessary.</li>\n<li>Access tends to cause lots of network traffic. Like, really huge lots. I haven\'t been able to find a solution for that. Using a network monitor is recommended if you want to keep an eye on that!</li>\n<li>Access insists on storing booleans as 0/-1. IMHO, 0/+1 makes more sense, and I believe it is the default way of doing things in MySQL as well. Not a huge problem, but if your checkboxes don\'t work, you should definitely check this.</li>\n</ul>\n\n<p>One possible alternative would be to put the backend (with the data) on a shared drive. I remember this is well-documented, also in the help. You may want to have a look at <a href="http://allenbrowne.com/ser-01.html" rel="noreferrer">some general advice on splitting into a frontend and a backend</a> and <a href="http://allenbrowne.com/ser-13.html" rel="noreferrer">code that automatically reconnects to the backend on startup</a>; I can also send you some more sample code, or post it here.</p>\n\n<p>Otherwise, you might also want to consider MS SQL. I don\'t have experience with that, but I presume it works together with MS Access much more nicely!</p>\n'}, {'answer_id': 67817, 'author': 'David-W-Fenton', 'author_id': 9787, 'author_profile': 'https://Stackoverflow.com/users/9787', 'pm_score': 2, 'selected': False, 'text': "<p>Gareth Simpson opined:</p>\n\n<blockquote>\n  <p>If it's only two users, then Access\n  should do just fine if you put the\n  .mdb on a shared drive.</p>\n</blockquote>\n\n<p>Er, no. There is no multi-user Access application for which each user should not have a dedicated copy of the front end. That means each user should have an MDB on their workstation. Why? Because the objects in front ends do not share well (not nearly as well as Jet data tables, though there aren't any of those in this scenario using MySQL as the back end).</p>\n\n<p>Gareth Simpson continued:</p>\n\n<blockquote>\n  <p>I believe the recommended max\n  concurrent users for Access is 5 but\n  on occasion I've pushed it past this\n  and never come unstuck.</p>\n</blockquote>\n\n<p>No, this is completely incorrect. The theoretical limit for users of an MDB is 255. That's not realistic, of course, as once you reach about 20 users you have to program your Access app carefully to work well (though the things you need to do in an Access-to-Jet app are the same kinds of things you'd do to make any server database application efficient, e.g., retrieving the smallest usable data sets).</p>\n\n<p>In this case, since each user should have an individual copy of the front-end MDB, the multi-user limits of Access/Jet are simply not relevant at all.</p>\n"}, {'answer_id': 866988, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 2, 'selected': False, 'text': '<p>Dont forget to put some type time/date stamp on each record. sometimes ms access will think "another user has changed or deleted the record" and will not allow you to make a change! I found this out the hard way.</p>\n'}, {'answer_id': 1415116, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 4, 'selected': False, 'text': '<p>I know this topic is not too fresh, but just some additional explanations:</p>\n\n<p>If you want to use MS Access effectively, especially with bigger, multiuser databases, please do the following:</p>\n\n<ul>\n<li><p>split your MDB into frontend application and backend (data only) files - you\'ll have two separate MDB files then.</p></li>\n<li><p>migrate all the tables with data and structure into external database. It can be: MySQL (works very well, no database size limitations, requires some more skills as it\'s not MS technology, but it is a good choice in many cases - moreover you can scale your backend with more RAM and additional CPUs, so everything depends on your needs and hardware capabilities); Oracle (if you have enough money or some kind of corporate license) or Oracle 10g XE (if this is not a problem, that the database size is limited up to 4 GB and it will always use 1 GB of RAM and 1 CPU), MS SQL Server 2008 (it\'s a great pair to have MS Access frontend and MS SQL Server backend in all the cases, but you have to pay for license! - advantages are: close integration, both technologies are form the same vendor; MS SQL Server is very easy to maintain an effective at the same time) or Express edition (same story like with Oracle XE - almost the same limitations).</p></li>\n<li><p>relink your MS Access frontend with backend database. If you selected MS SQL Server for the backend then it will be as easy as to use the wizard from MS Access. For MySQL - you have to use ODBC drivers (it\'s simple and works very good). For Oracle - please do not use the ODBC drivers from Microsoft. These from Oracle will do their work much better (you can compare the time needed to execute SQL query from MS Access to Oracle via Oracle ODBC and MS Oracle ODBC drivers). At this point you\'ll have solid database backend and fully functional MS Access frontend - MDB file.</p></li>\n<li><p>compile your MDB frontend to MDE - it will give you a lot of speed. Moreover, it\'s the only reasonable form of distributing MS Access application to your end users.</p></li>\n<li><p>for daily work - use MDE file with MS Access frontend. For futher MS Access frontend development use MDB file.</p></li>\n<li><p>don\'t use badly written ActiveX components to enhance MS Access frontend capabilities. Better write them yourself or buy the proper ones.</p></li>\n<li><p>don\'t believe into the myths that there are a lot of issues with MS Access - this is a great product which can help in may occassions. The problem is a lot of people assume it\'s a toy or that MS Access is generaly simple. Usually they generate a lot of errors and issues by themselves and their lack of knowledge and experience. To be successfull with MS Access it is important to understand this tool - this is the same rule, like with any other technology outhere.</p></li>\n</ul>\n\n<p>I can tell you that I\'m using quite advanced MS Access fronted to MySQL backend and I\'m very satisfied (as a developer which is maintaining this application). My friends, the users are also satisfied as they feel very comfortable with the GUI (frontend), the speed (MySQL), they don\'t have any issues with records locking or database performance.</p>\n\n<p>Moreover, it\'s important to read a lot about good practices and other people experiences. I would say that in many cases MS Access is a good solution. I know a lot of dedicated, custom made systems which started as an experiment in form of private MS Access database (MDB file) and then evolved to: splitted MS Access (MDE - frontend, MDB - backend) and finally to: MS Access frontend (MDE) and "serious" database backend (mainly MS SQL Server and MySQL). It\'s also important that you can always use your MS Access solution as a working prototype - you have ready to use backend in your database (MySQL - let\'s assume) and you can rewrite frontend to the technology of your choice (web solution? maybe desktop C# application - what you require!).</p>\n\n<p>I hope I helped some of you considering the work with MS Access.</p>\n\n<p>Regards,\nWawrzyn\n<a href="http://dcserwis.pl" rel="noreferrer">http://dcserwis.pl</a></p>\n'}]
['https://Stackoverflow.com/questions/5842', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/726/']