While( res->next() ) fails one second loop thru the rows.
---------------------------------
if( verbose ) printf( "Updating Preferred NASDAQ database\n" );
try {
res = stmt->executeQuery("SELECT * FROM NASDAQnasdaq");
} catch (SQLException &e) {
cout << "ERROR: " << e.what();
cout << " (MySQL error code: " << e.getErrorCode();
cout << ", SQLState: " << e.getSQLState() << ")" << endl;
return EXIT_FAILURE;
}
if( verbose ) printf( "At res->next %d\n", res->rowsCount() );
while( res->next() ) {
cout << "Enter res->next " << endl;
std::string s_symbol = res->getString("symbol");
std::string c_symbol = res->getString("name");
cout << "In res->next " << s_symbol << " " << c_symbol << endl;
cout << "n_symbol.length: " << s_symbol.length() << endl;
// if( s_symbol.length() < 5 ) continue;
if( verbose ) printf( "After length\n" );
// int fifth_char = (int)s_symbol.at( 4 );
//if( verbose ) printf( "At switch %d\n", fifth_char );
}
---------------------
Updating Preferred NASDAQ database
At res->next 2771 Has plenty of rows to work with.
Enter res->next First entery into While
In res->next FLWS 1-800 FLOWERS.COM- Inc. This is the first symbol
n_symbol.length: 4 and the symbol length
After length
// At this point it is finished with the 1st row out of 2771
// Start the loop back for the While() and the Run Fails.
RUN FAILED (exit value 1, total time: 32s)
---------------------------------
if( verbose ) printf( "Updating Preferred NASDAQ database\n" );
try {
res = stmt->executeQuery("SELECT * FROM NASDAQnasdaq");
} catch (SQLException &e) {
cout << "ERROR: " << e.what();
cout << " (MySQL error code: " << e.getErrorCode();
cout << ", SQLState: " << e.getSQLState() << ")" << endl;
return EXIT_FAILURE;
}
if( verbose ) printf( "At res->next %d\n", res->rowsCount() );
while( res->next() ) {
cout << "Enter res->next " << endl;
std::string s_symbol = res->getString("symbol");
std::string c_symbol = res->getString("name");
cout << "In res->next " << s_symbol << " " << c_symbol << endl;
cout << "n_symbol.length: " << s_symbol.length() << endl;
// if( s_symbol.length() < 5 ) continue;
if( verbose ) printf( "After length\n" );
// int fifth_char = (int)s_symbol.at( 4 );
//if( verbose ) printf( "At switch %d\n", fifth_char );
}
---------------------
Updating Preferred NASDAQ database
At res->next 2771 Has plenty of rows to work with.
Enter res->next First entery into While
In res->next FLWS 1-800 FLOWERS.COM- Inc. This is the first symbol
n_symbol.length: 4 and the symbol length
After length
// At this point it is finished with the 1st row out of 2771
// Start the loop back for the While() and the Run Fails.
RUN FAILED (exit value 1, total time: 32s)