mirror of
https://github.com/cuberite/SQLiteCpp.git
synced 2025-08-04 09:46:02 -04:00
29 lines
602 B
C++
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;
|
|
}
|