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("");
>      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: 

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.

sqlite-users mailing list

Reply via email to