Is this the safest/optimal code for a simple "does the record exist" question:
. . . // "oc" is an OracleConnection component
const string sql = "SELECT COUNT(*) FROM CONGRESS WHERE IQ > WEIGHT"; //Most politicians have more pounds than sense
try {
using (OracleCommand ocmd = new OracleCommand(sql, oc)) {
return Convert.ToInt32(ocmd.ExecuteScalar()) > 0;
}
. . . // the rest elided to spare the vertical scroll-bar bearings
?