The C++ SQLite wrapper library


vsqlite++ is a simple to use SQLite wrapper. It's BSD licensed

Latest Version: 0.3.13

vsqlite++ is simple

#include <sqlite/connection.hpp>
#include <sqlite/execute.hpp>
#include <sqlite/query.hpp>
#include <iostream>

int main() {
  try {

    sqlite::connection con("test.db");
    sqlite::execute(con, "CREATE TABLE test(id INTEGER PRIMARY KEY, name TEXT);", true);
    sqlite::execute ins(con, "INSERT INTO TEST VALUES(?, ?);");

    ins % sqlite::nil % "Hello";

    sqlite::query q(con, "SELECT * FROM test;");
    boost::shared_ptr<sqlite::result> result = q.get_result();
    while(result->next_row()) {
      std::cout << "ID:   " << result->get_int(0) << "\n"
                << "Name: " << result->get_string(1) << std::endl;

  catch(std::exception const & e) {
    std::err << "An error occurred: " << e.what() << std::endl;
    return 1;
  return 0;


Install it with a package manager

Who uses vsqlite++?


Did you find a bug? Do you have any good idea for improving vsqlite++? Just give vsqlite++'s GitHub Page a visit and create a new ticket. Alternatively you can just fork the project and create a pull request. If you have some questions you can just join the mailinglist or visit the IRC channel. You can also directly add issues and feature requests to the issue tracker.

Fork me on GitHub