* @brief Execute an SQL query provided in the query string * * This method executes the given query in the string. This method assumes this * query object has a valid and open Database connection associated with it. It * will also check the result for valid completion and toss an iException if the * caller has established this course of action when it fails. * * Results are
| 110 | * iException is thrown if it fails. |
| 111 | */ |
| 112 | bool SqlQuery::exec(const std::string &query) { |
| 113 | bool ok = this->QSqlQuery::exec(IString::ToQt(query)); |
| 114 | if((!ok) && isThrowing()) { |
| 115 | string mess = "Query \'" + query + "\' failed to execute"; |
| 116 | tossQueryError(mess, _FILEINFO_); |
| 117 | } |
| 118 | return (ok); |
| 119 | } |
| 120 | |
| 121 | /** |
| 122 | * @brief Returns the executed query string |
no outgoing calls