ipython-sql
ipython-sql copied to clipboard
(question) sqlite - path with spaces or r-strings
how do I connect to sqlite db (on win) if the path contains spaces?
%sql sqlite:///c:\\tmp tmp\\db.db3
does not work - (sqlite3.OperationalError) near "tmp": syntax error
can I somehow use s r-strings , such as
%sql r'sqlite:///c:\tmp tmp\db.db3'
or even connect to path stored in a variable
file_name = r'c:\tmp tmp\db.db3'
%sql sqlite:/// + file_name
thanks
I have the same question. I was going to create a new issue but I encountered this link.
The question remains same.
How to connect to the local database file mydb.db
which is located inside a folder which have spaces in it.
For example:
%sql sqlite:////c/Users/MyUsername/OneDrive - MyCompany/myfolder/subfolder/mydb.db
How to escape the whitespaces in One drive folder?
Note: I am working on Windows Platform.