Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Creating a Login session for users who access a particular database
Forum Updated to NodeBB v4.3 + New Features

Creating a Login session for users who access a particular database

Scheduled Pinned Locked Moved Unsolved General and Desktop
7 Posts 3 Posters 637 Views 1 Watching
  • 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 Offline
    C Offline
    CEO.
    wrote on last edited by CEO.
    #1
    This post is deleted!
    SGaistS 1 Reply Last reply
    0
    • VRoninV Offline
      VRoninV Offline
      VRonin
      wrote on last edited by
      #2

      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
      1
      • C Offline
        C Offline
        CEO.
        wrote on last edited by
        #3

        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
        0
        • C CEO.

          This post is deleted!

          SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          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
          0
          • SGaistS SGaist

            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 ?

            C Offline
            C Offline
            CEO.
            wrote on last edited by
            #5

            @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
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              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
              0
              • SGaistS SGaist

                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.

                C Offline
                C Offline
                CEO.
                wrote on last edited by
                #7
                This post is deleted!
                1 Reply Last reply
                0

                • Login

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • Users
                • Groups
                • Search
                • Get Qt Extensions
                • Unsolved