Error on Xcode 4.3.2 <Attempt to write a readonly database>
===

I am new on iphone programming..
I keep getting the error <attempt to write a readonly database>
and I have no idea how to change the permission for SQLite

>Error while updating. attempt to write a readonly database

and the following is my coding

> NSString *filePath = [[NSBundle mainBundle]pathForResource:@"card" ofType:@"sqlite"];  
> sqlite3_stmt *statement;

>if(sqlite3_open([filePath UTF8String], &db) == SQLITE_OK)
><br>  {   
> &nbsp; const char *query_stmt = "UPDATE card SET isActivate =?";
> <br>  &nbsp; if(sqlite3_prepare_v2(db, query_stmt, -1, &statement, NULL) != SQLITE_OK)
>  <br>&nbsp;&nbsp;&nbsp;&nbsp;      {
>     <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;       NSAssert1(0, @"Error while creating update statement. '%s'", sqlite3_errmsg(db));
>   <br>&nbsp;&nbsp;&nbsp;&nbsp;     }
>   <br> }
>   <br><br><br> sqlite3_bind_int(statement, 1, 1);
> <br>   if(SQLITE_DONE != sqlite3_step(statement))
<br>&nbsp;&nbsp;&nbsp;{
>    <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;   NSLog(@"Error while updating. %s", sqlite3_errmsg(db));
>   <br>&nbsp;&nbsp;&nbsp; }

>    sqlite3_finalize(statement);<br> 
>    sqlite3_close(db);

Hope someone could help me because this really makes me feel frustrated..