从 JDBC 创建 SQLite 数据库文件?

发布于 2024-09-28 06:48:20 字数 74 浏览 0 评论 0原文

我已经从 Java 创建了一个 SQLite 数据库。现在我想知道它在磁盘上的物理存储位置,以便我可以将该文件推送到 Android。

I have created a SQLite database from Java. Now I want to know where it is stored physically on disk, so that I can push that file on to Android.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

司马昭之心 2024-10-05 06:48:20

您将数据库名称指定为 JDBC 连接 URL 的一部分。在硬盘上查找具有该名称的文件。示例:

jdbc:sqlite:test.db

->寻找test.db

You specified a database name as part of the JDBC connection URL. Look for a file with that name on your harddisk. Example:

jdbc:sqlite:test.db

-> look for test.db

鸩远一方 2024-10-05 06:48:20

SQLite 通常会生成一个扩展名为 .sqlite 的文件,但这只是约定,扩展名可以是任何内容。

正如已经说过的,打开数据库的代码指定了文件应存储的路径,因此您必须查看那里。

SQLite usually produces one file with the extension .sqlite, but this is just convention, the extension can be anything.

As already was said, the code which opens the database spefifies the path where the file should be stored, so you have to look there.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文