On 27/06/2009 3:36 AM, Kalyani Phadke wrote: > Is there any way to find the version of SQlite3 database. eg. I have > test.DB file . I want to know which SQLite3 version its using ..eg 3.5.4 > or 3.6.15?
Short answer: You can't know. What problem do you face that makes you want to know? If the problem is "I need to know the earliest version of SQLite3 that can be used to access test.db" Long answer: Assuming the database has been created/updated by version X of the library and you attempt to open the database with version Y of the library: if Y < X and X used some new feature that Y doesn't know about: Y won't access the database Q: How does Y know what X did? A: X records the most recent feature-set that it used in bytes 44..47 of the database header; see http://www.sqlite.org/fileformat.html#database_header From the number you find there (should be one of 1, 2, 3, 4) you can infer some but not much information about what versions have been updating the database. Note: either of those two versions that you mention could have been updating the database, but if neither used any new features, the magic number would be 1 on both cases. The magic number ("Schema layer file-format") is in effect a file-format version number. This may well be what you need -- there seems to be no way of getting this number short of opening the database as a file however you can and digging it out. HTH, John _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users