User Ratings

★★★★★
★★★★
★★★
★★
1
0
0
0
0
ease 1 of 5 2 of 5 3 of 5 4 of 5 5 of 5 0 / 5
features 1 of 5 2 of 5 3 of 5 4 of 5 5 of 5 0 / 5
design 1 of 5 2 of 5 3 of 5 4 of 5 5 of 5 0 / 5
support 1 of 5 2 of 5 3 of 5 4 of 5 5 of 5 0 / 5

Rate This Project
Login To Rate This Project

User Reviews

  • // a simple example to use SQLitePP void simple_example() { //define a connection SQLitePP::DBConnection conn; // connect to a database int rc = conn.connect("D:\\mytestdb.db"); if (rc != 0) { std::cout << conn.getErrorMessage() << std::endl; return; } // define a command and set a command text SQLitePP::DBCommand cmd(&conn); cmd.setCommandText("create table tbl_test(id integer not null, name text, contact text)"); rc = cmd.execute(); // execute if (rc != 0) { std::cout << conn.getErrorMessage() << std::endl; return; } // insert data cmd.setCommandText("insert into tbl_test(id, name, contact) values(0, 'gavin', 'vxling@gmail.com')"); rc = cmd.execute(); // execute if (rc != 0) { std::cout << conn.getErrorMessage() << std::endl; return; } // execute a query cmd.setCommandText("select * from tbl_test"); rc = cmd.execute(); // execute if (rc != 0) { std::cout << conn.getErrorMessage() << std::endl; return; } // print all result while (cmd.fetchNext()) { std::cout << cmd.field(0) << ", " << cmd.field(1) << std::endl; } }
  • Previous
  • You're on page 1
  • Next