Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct

    Unsolved Creating a Login session for users who access a particular database

    General and Desktop
    3
    7
    127
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • C
      CEO. last edited by CEO.

      This post is deleted!
      SGaist 1 Reply Last reply Reply Quote 0
      • VRonin
        VRonin last edited by

        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.

        "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
        ~Napoleon Bonaparte

        On a crusade to banish setIndexWidget() from the holy land of Qt

        1 Reply Last reply Reply Quote 1
        • C
          CEO. last edited by

          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.db2.JPG db1-1.JPG

          1 Reply Last reply Reply Quote 0
          • SGaist
            SGaist Lifetime Qt Champion @CEO. last edited by

            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 ?

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            C 1 Reply Last reply Reply Quote 0
            • C
              CEO. @SGaist last edited by

              @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

              ddb.JPG

              1 Reply Last reply Reply Quote 0
              • SGaist
                SGaist Lifetime Qt Champion last edited by

                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.

                Interested in AI ? www.idiap.ch
                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                C 1 Reply Last reply Reply Quote 0
                • C
                  CEO. @SGaist last edited by

                  This post is deleted!
                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post