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. Manage a local database without using queries
Forum Updated to NodeBB v4.3 + New Features

Manage a local database without using queries

Scheduled Pinned Locked Moved Unsolved General and Desktop
8 Posts 4 Posters 341 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.
  • D Offline
    D Offline
    DangaTeo
    wrote on last edited by
    #1

    Hi guys,
    I would like to know if it was possible to manage a local database (.db) without using standard queries; for example to manage the creation or removal of tables and / or columns.

    Thanks in advance.

    jsulmJ 1 Reply Last reply
    0
    • D DangaTeo

      Hi guys,
      I would like to know if it was possible to manage a local database (.db) without using standard queries; for example to manage the creation or removal of tables and / or columns.

      Thanks in advance.

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @DangaTeo What kind of local database?

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • D Offline
        D Offline
        DangaTeo
        wrote on last edited by DangaTeo
        #3

        @jsulm Thank you for your reply; in my case it deals with simple SQLite database file, stored in local machine. At the moment i'm able to load this file in QSqlDatabase object with setDatabaseName public method.

        JonBJ 1 Reply Last reply
        0
        • D DangaTeo

          @jsulm Thank you for your reply; in my case it deals with simple SQLite database file, stored in local machine. At the moment i'm able to load this file in QSqlDatabase object with setDatabaseName public method.

          JonBJ Offline
          JonBJ Offline
          JonB
          wrote on last edited by
          #4

          @DangaTeo
          OK, then what do you mean/desire by " without using standard queries"? If you are using SQLite, you have to go through its query language....

          You can still use that to execute statements like CREATE TABLE, DROP TABLE etc. via QSqlDatabase queries --- they don't have to be e.g. just SELECT. There are loads of examples out there in Google.

          1 Reply Last reply
          1
          • D Offline
            D Offline
            DangaTeo
            wrote on last edited by
            #5

            @JonB ok alright, what i said earlier was just a test i was doing. But my question is whether Qt has a library available that can handle databases without going through sql?

            JonBJ 1 Reply Last reply
            0
            • D DangaTeo

              @JonB ok alright, what i said earlier was just a test i was doing. But my question is whether Qt has a library available that can handle databases without going through sql?

              JonBJ Offline
              JonBJ Offline
              JonB
              wrote on last edited by
              #6

              @DangaTeo
              In a word, no. If the database has some dedicated, non-SQL interface library you would have to use that directly.

              1 Reply Last reply
              0
              • SGaistS Offline
                SGaistS Offline
                SGaist
                Lifetime Qt Champion
                wrote on last edited by
                #7

                Hi,

                Are you looking for an ORM like QxOrm ?

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

                1 Reply Last reply
                0
                • D Offline
                  D Offline
                  DangaTeo
                  wrote on last edited by
                  #8

                  Thanks a lot to everyone;
                  I was looking for something integrated into Qt;
                  @SGaist I had seen other similar libraries before, however the one you recommended to me seems very interesting, I will definitely take a look it.
                  Thanks again.

                  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