Sebastien Rombauts 8d93693e88 Implementation of a SQLite Statement
- Added an "example.db3" simple database
- Comments
2012-03-31 09:59:11 +02:00

29 lines
602 B
C++

#include <iostream>
#include "../sqlite.hpp"
int main (void)
{
std::cout << "Hello SQLite.hpp\n";
try
{
SQLite::Database db("example.db3");
std::cout << db.getFilename().c_str() << " onpened\n";
SQLite::Statement stmt(db, "SELECT * FROM test");
std::cout << "statement created\n";
while (stmt.executeStep())
{
std::cout << "executeStep\n";
}
}
catch (std::exception& e)
{
std::cout << "SQLite exception: " << e.what() << std::endl;
}
std::cout << "Bye SQLite.hpp\n";
return 0;
}