If I want to add a NSString field to database I can do it by following way
sqlite3_bind_text(addStmt, 1, [PlaceName UTF8String], -1, SQLITE_TRANSIENT);
where, PlaceName is variable of type NSString inserted into column number 1. now If I want to add double field to database how can do it?
I tried following,
sqlite3_bind_double(addStmt, 4, [PlaceLongitude doubleValue]);
which gave error: Cannot convert to a pointer type.
Please help me. Thanks for any help, in advance.
Save double to DB
If
PlaceLongitudeisdouble, you can directly pass it to the method,The error
Cannot convert to a pointer typeis because you are trying to call a method on a primitive type (double).Retrieve double from DB