Error creating database with sqlite

Asked

Viewed 1,140 times

1

Colleagues,

I am trying to create database on a computer with the Sqlite. It is installed and everything OK, but when trying to create using the command by cmd:

C: Users José Roberto>sqlite3 C: Users José Roberto Desktop database sistema.db

This error appears:

Error: Unable to open database "C: Users Josú": Unable to open database file

Would anyone know why this mistake happens? It seems to me that the accent in the name Joseph may be the problem.

  • 2

    guy, puts your database folder in the root of the users folder and tries to see if it will work

  • Perfect Henricão. It worked. Thank you.

  • I’ll give you an answer here just so I don’t run out of anything, I’m glad you helped

  • 4

    Maybe the answer solved the "symptom", but not the problem, but the solution is a little more "down". Have you only tried sqlite3 Desktop Database system.db being in this folder? If the CMD code page is the same as the application, it is not to be mistaken. Now, that it is always better to avoid accents and special characters in paths, it is.

  • The problem is simply the space in the folder name. At the Windows command prompt, folders with space in the name need to be referenced between quotes. This will work: C:\Users\José Roberto>sqlite3 "C:\Users\José Roberto\Desktop\database\sistema.db"

1 answer

1


The error may be in the folder path, because cmd has problems with accent, pass your folder to the root that will work, the problem is in the same name.

  • 1

    The problem is not the accent, but the space in the folder name. Just reference the path between quotes that everything works, even with accent. So: C:\Users\José Roberto>sqlite3 "C:\Users\José Roberto\Desktop\database\sistema.db"

Browser other questions tagged

You are not signed in. Login or sign up in order to post.