Using sqlite3_bind_XXX inside a loop
问题 I want to do multiple parameterized inserts with SQLite in my code. For this : I have a single prepare statement outside of my loop as : error = sqlite3_prepare(connection, insert_sql, strlen(insert_sql), &stmt, NULL); I want inserts within a loop as: while ( not reached end of datafile ) { // Insert into server table sqlite3_bind_int(stmt, 1, id1); sqlite3_bind_double(stmt, 2, latitude); sqlite3_bind_double(stmt, 3, longitude); sqlite3_step(stmt); } The API docs for the function : https:/