Código Delphi [-] { // Obtener el número total de estaciones de servicio activas Close; SQL.Text := 'SELECT COUNT(*) AS MAX_REG FROM tblRepresentante WHERE ACTIVO = ''S'' '; Open; if isEmpty then raise Exception.Create('No hay estaciones de servicio activas'); MaxRegs := FieldByName('MAX_REG').AsInteger; ShowMessage('TODO BIEN'); }
{ // Obtener el número total de estaciones de servicio activas Close; SQL.Text := 'SELECT COUNT(*) AS MAX_REG FROM tblRepresentante WHERE ACTIVO = ''S'' '; Open; if isEmpty then raise Exception.Create('No hay estaciones de servicio activas'); MaxRegs := FieldByName('MAX_REG').AsInteger; ShowMessage('TODO BIEN'); }