SQLite database creation
-
Hello, I can't create a database variable and assign it to a file on my hard drive. On my C: drive I have a file "spanie1.db"
Here is the code:It seems to work correctly, the object "label" has it's text set to "Connected..."
However, any SQL query i want to implement doesn't work. Here is what I found out:
if I change line #2 and modify the path to "spanie1.db" to any other, or change file name for example:
mydb.setDatabaseName("C:/spanieeee1.db");the "label" text is also being set to "Connected..."
There is no such file as spanieeee1.db on my C drive, yet the program acts as if there indeed is.
Any solutions?
-
Hi and welcome to devnet,
What queries are failing ?
What error do you get ?
Does that database already contain data ? -
Additonal: do you really have write access to your root dir?
-
@Christian-Ehrlicher said in SQLite database creation:
Additonal: do you really have write access to your root dir?
Turns out I didn't. I changed the file location to D drive and it worked like magic. Thanks a lot!
Thread to be closed
-
@Giggon said in SQLite database creation:
Thread to be closed
Please go and mark the post as solved. Thanks