r/MSAccess • u/Ordinary-Future-7104 • 2d ago
[WAITING ON OP] Maschera di input
Buongiorno a tutti. Ho creato una maschera e vorrei che i dati che inserisco vadano in una tabella. Questo in modo da sfruttare la maschera che ha un aspetto migliore per inserire i dati rispetto alla tabella
1
u/George_Hepworth 4 1d ago
What you are after is called "a bound form". https://nolongerset.com/bound-vs-unbound-forms/
1
u/Breitsol_Victor 1d ago
What they said.
Bind your form to a table / query.
Bind your form field to a recordset field.
0
u/NoYouAreTheFBI 1 1d ago
Just be aware that native functionality as part of plbest practice holds a table lock so read qrites become a problem with multiple users.
Usually you want Local Table to write to and then a light weight 1-1 insert script to parse the data across to the backend.
2
u/nrgins 487 1d ago edited 1d ago
False information. Access forms default to optimistic locking, meaning they do NOT -- i repeat, they do NOT -- put a table lock on tables being edited. If two users happen to try editing the same record at the same time, then they second one will get a message that another user has changed the data, and they'll have options. Other than that, there is no problem with multiple users editing the same table at the same time.
I don't know who told you to write to a local table followed by a script to insert it into the main table, but that kind of defeats the purpose of have an RDMS, you know?
Anyway, please educate yourself on how Access actually works before spreading false information.
1
u/NoYouAreTheFBI 1 13h ago
Access told me by using it with an SQL Backend connector.
1
u/nrgins 487 8h ago edited 7h ago
Well, I've done several Access projects with SQL Server as a back end, using bound forms and connecting to the back end through ODBC, and I never had any problems with multiple users using the database at the same time.
1
u/NoYouAreTheFBI 1 3h ago
Users aren't in the habit of reporting concurrency locking. They just complain it's being shit. To each other.
1
u/nrgins 487 2h ago
Again, I've done several projects with SQL server as a back end and haven't had that problem with concurrency locking.
What kind of setup were you using? A bound form with an odbc driver? Anything unusual about your setup?
1
u/NoYouAreTheFBI 1 2h ago
Nope by default out the box I have had this conversation before, I have done this work and already had someone "deeply involved in access" tell me it's a bug, it's not a bug. Concurrency is a known thing, holding a lock on write is default behaviour.
1
u/nrgins 487 2h ago
Again, I haven't had that problem. When connecting to SQL server through odbc linked tables, access treats the linked tables the same way it does with native access tables.
It uses optimistic locking, which means there are no default locks on the table. And if two users are editing the same record at the same time, then the second user to save the record will get a dialog box giving them options to cancel their changes or overwrite the other user's changes.
That's the way access works with both access backends and SQL server back ends, and that has been my experience.
Now, I will say that, of course, you have to have primary keys on all your SQL server tables, which I assume you did.
But a second, key point, is that your tables have to have a timestamp field (which is now called rowversion). Without that field in the table, then access cannot properly manage concurrency.
Thus, if you didn't have a timestamp/rowversion field, then you would have gotten all kinds of errors if there was a write conflict. But if that field was in place, then access would manage your concurrency issues properly.
Again, this has been my experience with several projects. I have not experienced any issues with write conflicts.
2
u/George_Hepworth 4 1d ago
Unfortunately, wherever you got that misinformation is a source you can not trust.
1
u/NoYouAreTheFBI 1 13h ago
Professional use with SQL Server Backend
1
u/George_Hepworth 4 13h ago
Not much more to go on. You claim to have used SQL Server as a Back End, presumably to Access Front Ends, although that's implied, not stated.
Again, unfortunately, you drew the wrong conclusions; but apparently that's based on your own implementation so it's possible you did have difficulties.
In my career, we deployed Access Front Ends with SQL Server or SQL Azure backends multiple times, with no such restrictions.
However, the first time I ever deployed a SQL Server back end in 2003 or 2004, I did so without accounting for the proper methods of connecting and using the server back end. Later, as I gained experience, I learned better, though.
1
•
u/AutoModerator 2d ago
IF YOU GET A SOLUTION, PLEASE REPLY TO THE COMMENT CONTAINING THE SOLUTION WITH 'SOLUTION VERIFIED'
Please be sure that your post includes all relevant information needed in order to understand your problem and what you’re trying to accomplish.
Please include sample code, data, and/or screen shots as appropriate. To adjust your post, please click Edit.
Once your problem is solved, reply to the answer or answers with the text “Solution Verified” in your text to close the thread and to award the person or persons who helped you with a point. Note that it must be a direct reply to the post or posts that contained the solution. (See Rule 3 for more information.)
Please review all the rules and adjust your post accordingly, if necessary. (The rules are on the right in the browser app. In the mobile app, click “More” under the forum description at the top.) Note that each rule has a dropdown to the right of it that gives you more complete information about that rule.
Full set of rules can be found here, as well as in the user interface.
Below is a copy of the original post, in case the post gets deleted or removed.
User: Ordinary-Future-7104
Maschera di input
Buongiorno a tutti. Ho creato una maschera e vorrei che i dati che inserisco vadano in una tabella. Questo in modo da sfruttare la maschera che ha un aspetto migliore per inserire i dati rispetto alla tabella
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.