oraclecommand a = new oraclecommand("select count(*) as total from your_table where your_record_control=your_control",oracleconnection);
oraclereader b = a.executereader();
b.read();
string c = b["TOTAL"].tostring();
b.close();
if(c == 0)
{
my_string = string.empty;
}
else
{
go_get__your_record
}
RuiMachado
Marked as answer by Ming Xu - MSFT on May 31, 2012 12:43 PM
ruipedromach...
Member
258 Points
84 Posts
Re: If Exists in Oracle
May 06, 2012 09:50 AM|LINK
oraclecommand a = new oraclecommand("select count(*) as total from your_table where your_record_control=your_control",oracleconnection); oraclereader b = a.executereader(); b.read(); string c = b["TOTAL"].tostring(); b.close(); if(c == 0) { my_string = string.empty; } else { go_get__your_record }