On 23 Mar 2010, at 7:06pm, Martin Sigwald wrote: > Here is the actual code: > > int main(void) > { > sqlite3* db_handle; > > sqlite3_open(DB_NAME,&db_handle); > sqlite3_close(db_handle); > my_ping("10.0.0.4"); > > return 0; > } > > If I call close after ping, it works. However, if besides of opening the DB > I perform any query, ping doesnt work either.
I suspect that your value for DB_NAME has some bad syntax in it which has a result only when you try to close the database. Please tell us what values are returned by _open and _close. The value returned should be an integer: int rcOpen, rcClose; rcOpen = sqlite3_open(DB_NAME,&db_handle); // output the value of rcOpen here rcClose = sqlite3_close(db_handle); // output the value of rcClose here You can see possible result codes here: <http://www.sqlite.org/c3ref/c_abort.html> If both functions yield zero in your test, indicating all is fine, please try this new test code using ":memory:" where you currently have DB_NAME and see if your program still locks up. Simon. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users