Guest User

Untitled

a guest
Dec 16th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. int IpfixDbWriterOracle::executeSql(string sql, oracle::occi::ResultSet *rs, oracle::occi::Statement *stmt, int prefetchRowCount = 1)
  2. {
  3. rs = NULL;
  4. stmt = NULL;
  5. try
  6. {
  7. stmt = con->createStatement(sql);
  8. }
  9. catch (oracle::occi::SQLException& ex)
  10. {
  11. msg(MSG_FATAL,"IpfixDbWriterOracle: %s", ex.getMessage().c_str());
  12. return 1;
  13. }
  14. if (stmt)
  15. {
  16. try
  17. {
  18. stmt->setPrefetchRowCount(prefetchRowCount);
  19. rs = stmt->executeQuery();
  20. return 0;
  21. }
  22. catch (oracle::occi::SQLException& ex)
  23. {
  24. msg(MSG_FATAL,"IpfixDbWriterOracle: %s", ex.getMessage().c_str());
  25. return 1;
  26. }
  27. }
  28. return 1;
  29. }
Add Comment
Please, Sign In to add comment