Database Connect Problem, Out Of Memory
-
@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. -
@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 . -
@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. -
@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 -
@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 -
@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. -
@the_

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 -
Could you move the database somewhere less controversial like
C:/Temp/valutaand try if it works there? -
What size is that database ?
-
Is it encrypted ?
-
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. -
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.@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." -
Again, do you have any strange characters in your paths ? Anything non-ASCII ?
-
@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