2012-01-19 Ramon Novoa <rnovoa@artica.es>
* modules/pandora_module_odbc.cc: Check for NULL pointers. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5392 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
7689c34fd3
commit
4f9aacb7f0
|
@ -1,3 +1,7 @@
|
|||
2012-01-19 Ramon Novoa <rnovoa@artica.es>
|
||||
|
||||
* modules/pandora_module_odbc.cc: Check for NULL pointers.
|
||||
|
||||
2012-01-04 Ramon Novoa <rnovoa@artica.es>
|
||||
|
||||
* modules/pandora_module.cc: Fixed an error when checking multiple
|
||||
|
|
|
@ -143,13 +143,28 @@ void
|
|||
Pandora_Module_Odbc::doQuery () {
|
||||
string retval;
|
||||
auto_ptr<Statement> statement;
|
||||
Statement *statement_ptr;
|
||||
auto_ptr<ResultSet> results;
|
||||
ResultSet *results_ptr;
|
||||
ResultSetMetaData *metadata;
|
||||
int columns;
|
||||
|
||||
statement = auto_ptr<Statement> (this->con->createStatement ());
|
||||
results = auto_ptr<ResultSet> (statement->executeQuery (query));
|
||||
metadata = results->getMetaData ();
|
||||
statement_ptr = this->con->createStatement ();
|
||||
if (statement_ptr == NULL) {
|
||||
return;
|
||||
}
|
||||
statement = auto_ptr<Statement> (statement_ptr);
|
||||
|
||||
results_ptr = statement->executeQuery (query);
|
||||
if (results_ptr == NULL) {
|
||||
return;
|
||||
}
|
||||
results = auto_ptr<ResultSet> (results_ptr);
|
||||
metadata = results->getMetaData ();
|
||||
if (metadata == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
columns = metadata->getColumnCount ();
|
||||
|
||||
if (results->next ()) {
|
||||
|
|
Loading…
Reference in New Issue