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. Database Connect Problem, Out Of Memory
Qt 6.11 is out! See what's new in the release blog

Database Connect Problem, Out Of Memory

Scheduled Pinned Locked Moved Solved General and Desktop
41 Posts 8 Posters 39.8k Views 4 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.
  • jsulmJ jsulm

    @Taz742 "So do not work anyway" - what is the error message now?

    Taz742T Offline
    Taz742T Offline
    Taz742
    wrote on last edited by
    #15

    @jsulm
    The same error

    Do what you want.

    mrjjM Taz742T 2 Replies Last reply
    0
    • Taz742T Taz742

      @jsulm
      The same error

      mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by
      #16

      @Taz742
      Hi
      Could you perhaps open the DB in
      http://sqlitebrowser.org/
      and see what it says ?

      If its not the ""\u202A" char that gives this, then it could be great to see if other sqllite
      program loads it without any errors.

      Taz742T 1 Reply Last reply
      0
      • Taz742T Taz742

        @jsulm
        The same error

        Taz742T Offline
        Taz742T Offline
        Taz742
        wrote on last edited by
        #17

        @Taz742
        Yes same error.
        When I saw this problem for the first time, it happened while I was server (the server I'm working on a project RDP) I copied down the entire project on my computer. After "QSqlError (" - 1 "," Error opening database "," out of memory ")" \ u202AC: /Users/User/Desktop/newdata.db ", this problem has emerged in both the server and my computer, when an application started .

        Do what you want.

        1 Reply Last reply
        0
        • mrjjM mrjj

          @Taz742
          Hi
          Could you perhaps open the DB in
          http://sqlitebrowser.org/
          and see what it says ?

          If its not the ""\u202A" char that gives this, then it could be great to see if other sqllite
          program loads it without any errors.

          Taz742T Offline
          Taz742T Offline
          Taz742
          wrote on last edited by
          #18

          @mrjj
          I have not seen any hacking \ u202A problem. :/

          Do what you want.

          mrjjM 1 Reply Last reply
          0
          • Taz742T Taz742

            @mrjj
            I have not seen any hacking \ u202A problem. :/

            mrjjM Offline
            mrjjM Offline
            mrjj
            Lifetime Qt Champion
            wrote on last edited by mrjj
            #19

            @Taz742
            and what did SQLBrowser say?

            Update:
            This error can come from things NOT related to memory at all. it seems
            http://servalpaul.blogspot.dk/2011/12/misleading-out-of-memory-error-in.html

            the_T 1 Reply Last reply
            0
            • mrjjM mrjj

              @Taz742
              and what did SQLBrowser say?

              Update:
              This error can come from things NOT related to memory at all. it seems
              http://servalpaul.blogspot.dk/2011/12/misleading-out-of-memory-error-in.html

              the_T Offline
              the_T Offline
              the_
              wrote on last edited by
              #20

              @mrjj
              In most cases it has to do with write permissions. Had the same error when trying to create a sqlite database in a location with no write access for the user.

              -- No support in PM --

              mrjjM 1 Reply Last reply
              1
              • the_T the_

                @mrjj
                In most cases it has to do with write permissions. Had the same error when trying to create a sqlite database in a location with no write access for the user.

                mrjjM Offline
                mrjjM Offline
                mrjj
                Lifetime Qt Champion
                wrote on last edited by
                #21

                @the_
                Good info.
                So in any case its misleading as hell :)

                the_T 1 Reply Last reply
                0
                • mrjjM mrjj

                  @the_
                  Good info.
                  So in any case its misleading as hell :)

                  the_T Offline
                  the_T Offline
                  the_
                  wrote on last edited by
                  #22

                  @mrjj
                  this was my first guess here too.

                  @Taz742
                  does the db file exist when you start your program? if yes, can you access it using QFile with the given path, try to open(QFile::ReadOnly) and read it? (would be binary content only)

                  -- No support in PM --

                  Taz742T 1 Reply Last reply
                  1
                  • the_T the_

                    @mrjj
                    this was my first guess here too.

                    @Taz742
                    does the db file exist when you start your program? if yes, can you access it using QFile with the given path, try to open(QFile::ReadOnly) and read it? (would be binary content only)

                    Taz742T Offline
                    Taz742T Offline
                    Taz742
                    wrote on last edited by
                    #23

                    @the_
                    alt text
                    Did you see the file in the address really exists?
                    And answer Is:

                        db = QSqlDatabase::addDatabase("QSQLITE");
                    
                        db.setDatabaseName("‪C:/Users/tleladze/Desktop/valuta/dbbb.sqlite");
                        if(db.open()){
                            qDebug() << "db opened";
                        }
                        else
                            qDebug() << db.lastError();
                    
                        QString paths = "‪C:/Users/tleladze/Desktop/valuta/dbbb.sqlite";
                    
                        QFile* file = new QFile(paths);
                    
                        if(!file->open(QIODevice::ReadOnly)){
                            qDebug() << "Filed To Open";
                        }
                    
                    QSqlError("-1", "Error opening database", "out of memory")
                    Filed To Open
                    

                    Do what you want.

                    1 Reply Last reply
                    0
                    • VRoninV Offline
                      VRoninV Offline
                      VRonin
                      wrote on last edited by
                      #24

                      Could you move the database somewhere less controversial like C:/Temp/valuta and try if it works there?

                      "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

                      Taz742T 1 Reply Last reply
                      1
                      • VRoninV VRonin

                        Could you move the database somewhere less controversial like C:/Temp/valuta and try if it works there?

                        Taz742T Offline
                        Taz742T Offline
                        Taz742
                        wrote on last edited by
                        #25

                        @VRonin
                        No. Nothing :/

                        Do what you want.

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

                          What size is that database ?

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

                          Taz742T 1 Reply Last reply
                          1
                          • SGaistS SGaist

                            What size is that database ?

                            Taz742T Offline
                            Taz742T Offline
                            Taz742
                            wrote on last edited by
                            #27

                            @SGaist
                            448KB

                            Do what you want.

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

                              Is it encrypted ?

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

                              Taz742T 1 Reply Last reply
                              0
                              • SGaistS SGaist

                                Is it encrypted ?

                                Taz742T Offline
                                Taz742T Offline
                                Taz742
                                wrote on last edited by
                                #29

                                @SGaist
                                No

                                Do what you want.

                                Taz742T 1 Reply Last reply
                                0
                                • Taz742T Taz742

                                  @SGaist
                                  No

                                  Taz742T Offline
                                  Taz742T Offline
                                  Taz742
                                  wrote on last edited by
                                  #30

                                  Nor a new base allows. Now I tried to upload the XML file QFile and not uploaded.

                                  Do what you want.

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

                                    Please post the exact error you are getting. Just saying it doesn't work doesn't help to diagnose what happens on your machine.
                                    QFile also provides an error function for that.

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

                                    Taz742T 1 Reply Last reply
                                    0
                                    • SGaistS SGaist

                                      Please post the exact error you are getting. Just saying it doesn't work doesn't help to diagnose what happens on your machine.
                                      QFile also provides an error function for that.

                                      Taz742T Offline
                                      Taz742T Offline
                                      Taz742
                                      wrote on last edited by
                                      #32

                                      @SGaist said in Database Connect Problem, Out Of Memory:

                                      Please post the exact error you are getting. Just saying it doesn't work doesn't help to diagnose what happens on your machine.
                                      QFile also provides an error function for that.

                                          db = QSqlDatabase::addDatabase("QSQLITE");
                                      
                                          db.setDatabaseName("‪C:/Users/tleladze/Desktop/temp/dbbb.sqlite");
                                          if(db.open()){
                                              qDebug() << "db opened";
                                          }
                                          else
                                              qDebug() << db.lastError();
                                      
                                          QString paths = "‪C:/Users/tleladze/Desktop/queryxml.xml";
                                      
                                          QFile* file = new QFile(paths);
                                      
                                          if(!file->open(QIODevice::ReadOnly)){
                                              qDebug() << "Filed To Open: " << file->errorString();
                                          }
                                      

                                      debug:
                                      QSqlError("-1", "Error opening database", "out of memory")
                                      Filed To Open: "The filename, directory name, or volume label syntax is incorrect."

                                      Do what you want.

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

                                        Again, do you have any strange characters in your paths ? Anything non-ASCII ?

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

                                        VRoninV 1 Reply Last reply
                                        4
                                        • SGaistS SGaist

                                          Again, do you have any strange characters in your paths ? Anything non-ASCII ?

                                          VRoninV Offline
                                          VRoninV Offline
                                          VRonin
                                          wrote on last edited by
                                          #34

                                          @SGaist said in Database Connect Problem, Out Of Memory:

                                          Again, do you have any strange characters in your paths ? Anything non-ASCII ?

                                          Just to make sure, right click your .cpp file, open with->notepad->file->save as->select the encoding to be ANSI. if notepad complains about unicode chars then old Samuel was correct (as is often the case). click ok, overwrite the old .cpp file and try again

                                          "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

                                          Taz742T 2 Replies Last reply
                                          4

                                          • Login

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