开发者

Can I use sqllite with a mySQL backup file?

If i wanted to use a mySQL database offline, could i download it from a server and SELECT from it when i am offline? That way I could us开发者_JS百科e the version on the server when online, and use the local copy when offline.

i want to do something like this:

sql_con = new SQLiteConnection("Data Source=MySQLDB.sql") 


If you want to use your MySQL database offline, it would be much easier for you to run a second instance of the MySQL server software on your own computer. Replicate the server database on your computer and then, when you want to use the local copy, attach to the local MySQL instance.


MySQL and SQLite are two completely different databases with wildly different file formats. So straight file reuse is not an option. You can, however, export the database from MySQL in SQLite-friendly format (like CSV, or straight-out SQL), and import that into SQLite. There will be some coding involved, most likely.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜