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.
精彩评论