Nicolás Brailovsky


A modern blog

Cofeeeeeee

author Posted by: nico on date Mar 18th, 2010 | filed Filed under: C++, Grumpy
  1.  
  2. int main() {
  3. otl_connect db;
  4. otl_connect::otl_initialize();
  5. db.rlogon("whatever");
  6.  
  7. int cuarentaydos;
  8. const char *sql = "select 42 drom dual";
  9. otl_stream stmt(1, sql, db);
  10.  
  11. if (!stmt.eof()) stmt >> cuarentaydos;
  12. std::cout << "En la base 42 == " << cuarentaydos << "\n";
  13.  
  14. db.logoff();
  15. }
  16.  

I spent half an hour looking for the error. How come drom is not a standard sql keyword? Damn!

     Add A Comment

trackback Trackback URI | rsscomment Comments RSS