public bool hasAttribute( int? signalId, String attributeName )
{
int count = 0;
String sql = "SELECT count(*) FROM signal_attribute_master WHERE signal_id = ? AND attribute_name = ?";
OleDbParameter[] dbParams = { CreateParameter(dbSignalAttribute._SIGNAL_ID, signalId),
CreateParameter(dbSignalAttribute._ATTRIBUTE_NAME, attributeName ) };
using (OleDbDataReader reader = ExecuteSqlQuery( sql, dbParams ))
{
if (reader != null)
{
if (reader.Read())
{
count = reader.GetInt32( 0 );
}
reader.Close();
reader.Dispose();
}
}
return count>0;
}