On Monday, 2 January, 2017 19:29, Domonic Tom <abdom...@hotmail.com> wrote:
> Is there a way to test whether the DB_handle used when opening a database > is good? Can you define "good", and provide an example that would meet the converse, "ungood"? Clearly a NULL (0) pointer is "ungood" (as is a "flying pointer"), but you would not get that after calling one of the open functions and at the same time receiving an SQLITE_OK return code. > I need to find some way of testing it to make sure it represents the live > connection to a database? Again, can you define "the live connection"? If a database handle pointer is returned by one of the sqlite3_open* calls, which also returned an SQLITE_OK return code, and you have not closed the connection (released), then the database handle pointer is a valid database connection handle. Or do you mean that you lost track of your pointers and want to make sure that you do not have a pointer that is pointing to something already freed (due to a programming error in the application)? > Is that possible? Can you define "good" vs "ungood"? _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users