sqlzap="select * from STRIPE WHERE STRIPE = '"+RugidK+"' and (WORKID2 BETWEEN '"+c+"' AND '"+po+"')"; DataSource1->DataSet = Query1; Query1->SQL->Clear(); Query1->SQL->Add(sqlzap); Query1->Active = true; 

I use about such requests. It is necessary to process if sql did not find anything. Must be something like if(Query1->XXXX!=0){}

    3 answers 3

     if (Query1->IsEmpty()) {...} 

      I don’t really think honestly, but if you think

       Query1->RecordCount // возвращает количество строк<BR> if(Query1->RecordCount==0){ } 
         $result = mysql_query(SELECT * FROM emptytable); $result = mysql_fetch_assoc($result); if(!empty($result)) { //если результат не пустой }