In your SQL query:
UPDATE User SET balance = ? WHERE id = ?;
?
→ balance
?
→ id
You were binding them in the wrong order. Correct binding order:
sqlite3_bind_double(updateStatement, 1, balance) // 1 — balance
sqlite3_bind_int(updateStatement, 2, Int32(id)) // 2 — id