开发者

cannot open SQLite datafile file [.db]

So I'm using SQLite, and I created my test.db

For some reason, I can't open this database. Not with Microsoft Excel nor notepad. I tried googling it, but there were way 开发者_如何学运维too many results of more advanced matters.


If you are using Firefox as your browser, you can attach to the sqlite file from the SQLite Manager Add On.

Otherwise, you can install a full bodied program (SQLiteManager) to attach to it.


Your problem is that the sqlite datatype is not a user-readable format.

It is compressed and optimised for storing the database, and thus can only be opened by sqlite, or something that uses sqlite.

For editing, I'd suggest something like SQLite Browser: http://sourceforge.net/projects/sqlitebrowser/


You can open an Sqlite database in excel if you dump it to a text file first.

Just download the sqlite3 browser from sourceforge, and type in

echo '.dump' | sqlite3.exe yourdatabase.db > atextfile.csv

And open the .csv file in Excel.


SQLite has a different internal format than anything that excel or notepad can open.

If you want to look at the database, you need to use the sqlite command line or a sqlite browser, like at http://sqlitebrowser.sourceforge.net/

Best of luck!


Why do you think you can open it with Excel or notepad? It's neither a text file neither a MS Excel spreadsheet.

SQLite DBs in general are intended to be used directly by your application via the appropriate SQLite libraries, still there are several frontends available to let you edit them directly.

First of all, there's the usual sqlite3.exe, which provides a command-line interface to operate on the DB; still, if you're not expert in SQL you may find it difficult to use.

Then there's the nice Sqliteman application, that lets you access SQLite DBs with a nice GUI.

Another possibility is to use VS.NET integrated DB viewer ("Server Explorer", IIRC) after you install the .NET SQLite provider.


You'll need the SQLite engine running on your machine. AFAIK it is embedded (or optionally embedded) into scripting language parsers like PHP and Python. I'm not sure if there's a GUI similar to MySQL Workbench that you can use to open up the DB, but it may be worth a shot on Google to see if there is.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜