RString sql = "SELECT intcol, realcol, stringcol FROM acdk_PreparedStatement_Test WHERE intcol < ?";
RPreparedStatement statement = connection->prepareStatement(sql);
statement->setInt(1, 2); // 1 = first '?'
RResultSet rset = statement->executeQuery();
int count = 0;
while (rset->next() == true)
{
int intcol = rset->getInt(1);
float floatcol = rset->getFloat("realcol");
RString sval = rset->getString("stringcol");
++count;
}
|