Add Sunisoft online update software to the software project. When the software version is updated, the user automatically detects and downloads the new software version. The software features are relatively simple, mainly reading sqlite files. However, during use, it is found that as long as you connect to the sqlite database, the update software will think that the sqlite database file has been modified, which is inconsistent with the version on the server and needs to be updated. Compared with md5, the database is not modified when it is opened. Later, the test showed that as long as the file is opened in writable mode, Sunisoft considers that the file has been modified, even if it is not written after it is opened. Find the cause and then solve it easily. Since the software does not need to perform some operations on the sqlite file, it is mainly a query operation, so you can connect to the sqlite database in read-only mode. Sqlite3 provides a read-only interface for opening files. [Cpp] int sqlite3_open_v2 (const char * filename,/* Database filename (UTF-8) */sqlite3 ** ppDb,/* OUT: SQLite db handle */int flags, /* Flags */www.2cto.com const char * zVfs/* Name of VFS module to use */); the first parameter is the database file path, and the second parameter is the output parameter, database Operation pointer address. The third parameter is the database access mode. you can configure this parameter to open a database in read-only mode. It can be SQLITE_OPEN_READONLY, SQLITE_OPEN_READWRITE, and SQLITE_OPEN_READWRITE. | one of SQLITE_OPEN_CREATE is used to control the database access mode, it can be used with SQLITE_OPEN_NOMUTEX, SQLITE_OPEN_FULLMUTEX, SQLITE_OPEN_SHAREDCACHE, and SQLITE_OPEN_PRIVATECACHE. The fourth parameter zVfs allows the customer's application to name a Virtual File System module to connect to the database. VFS is an abstraction layer between SQlite library and underlying storage systems (such as a file system). Generally, a customer application can simply pass a NULL pointer to this parameter, to use the default VFS module.