如何打开位于 sqlite3 中特定文件夹中的数据库文件?
How do I open a database file located in a specific folder in sqlite3?
我有这个 chinook.db
数据库文件,我存储在 C:\sqlite\db 中,每次我尝试通过命令 .open C:\sqlite\db\chinook.db
使用 sqlite shell 访问它时, sqlite 在主目录中创建一个 sqlitedbchinook.db
数据库文件。为什么会发生这种情况,我该如何解决我的问题?
来自Command Line Shell For SQLite:
....You might want to use a full pathname to ensure that the file is in
the directory that you think it is in. Use forward-slashes as the
directory separator character. In other words use "c:/work/ex1.db",
not "c:\work\ex1.db".
更改为:
.open "C:/sqlite/db/chinook.db"
我有这个 chinook.db
数据库文件,我存储在 C:\sqlite\db 中,每次我尝试通过命令 .open C:\sqlite\db\chinook.db
使用 sqlite shell 访问它时, sqlite 在主目录中创建一个 sqlitedbchinook.db
数据库文件。为什么会发生这种情况,我该如何解决我的问题?
来自Command Line Shell For SQLite:
....You might want to use a full pathname to ensure that the file is in the directory that you think it is in. Use forward-slashes as the directory separator character. In other words use "c:/work/ex1.db", not "c:\work\ex1.db".
更改为:
.open "C:/sqlite/db/chinook.db"