Creating a Login session for users who access a particular database
-
This is not a feature you need to implement yourself, it can be done server side, see this for MS SQL Server
P.S.
I'm a simple man: I see passwords in plain text, I throw up. -
hello VBolin, thanks a bunch for your feedback. It's truly appreciated.
But I was thinking the developed application, (not the server), can be programmed to keep record of whoever logs in successfully but I get stuck on how the login details verified can reflect on the next windows it ushers one into.That's just what I was thinking.
Also, can you please make me your student a little be teaching me a way I can manipulate another tables having primary and foreign keys, so the foreign key gets automatically updated based on an event, well I don't know if this is the right thread to discuss this but no knowledge would be lost.
-
Hi,
@CEO said in Creating a Login session for users who access a particular database:
I would want the database to take note of all the user does whenever he logs into the application
So you want your application to report anything and everything your user does and store that somewhere ?
-
@SGaist hello. Thanks for contributing.
My answer to your question is yes.
I would like to have record of every action create new record, delete a record, update a record (C.U.D), I would like to know the registered user who performed any of the activity and their userID should be saved in a column reserved for userID in the stockData table.You know, this is not about the system (Windows) saving the information but my developed application. So it has nothing to do with Windows server. How can I program it? The code has to be in my project code.!
As seen in the attached photo, that's a record in the table I inputted about an hour ago. I would want the userNo there to be automatically captured when the user creates new item record and saves it.
There's another table where users and their details are stored. It has a column titled userNo there as a primary key, the stockData table has it as its foreign key and references it, thus you see it in that table record but I didn't input any value for it when creating the record in the form
-
The OS does not offer that kind of functionality anyway so you have to implement it yourself.
You'll have to write a layer to intercept the data you want or make that part of each relevant classes.
Be aware that you may be generating quite a lot of data.
If you are talking about logging only the database actions, you should consider doing that on the backend.