View Issue Details

IDProjectCategoryView StatusLast Update
0003811MMW v4Synchronizationpublic2007-10-26 17:18
Reporterjiri Assigned To 
PriorityimmediateSeveritymajorReproducibilitysometimes
Status closedResolutionfixed 
Product Version3.0 
Fixed in Version3.0 
Summary0003811: SQL error in Device configuration dialog
DescriptionAn EL from a user showed the following error:

Error executing SQL "SELECT NULL FROM Songs WHERE Songs.IDFolder in (SELECT IDChildFolder FROM FoldersHier WHERE IDFolder=?) AND (SELECT Songs.Id
FROM Songs AND NOT Songs.id = -5 AND NOT exists (SELECT idTrack FROM PodcastEpisodes WHERE PodcastEpisodes.idTrack = Songs.id) )
" : near "AND": syntax error (1, 1).

From my search it seems to be caused by the following code from FormDeviceConfig.pas:

    if (MusicFilter = nil) or (MusicFilter.actFilter <> currID) then
    begin
      myFreeAndNil( MusicFilter); // Need to re-init filter
      MusicFilter := TFilter.Create;
      AudiobooksQuery := JoinAudiobooksFilters(' AND NOT ');
      if CBFilter.ItemIndex = 0 then
      begin
        MusicFilter.SetFilter( -1,
          ' NOT ' + AudiobooksQuery //Exlude audiobooks
          + ' AND NOT ' + PodcastQuery); //Exclude podcasts
      end
      else
      begin
        MusicFilter.SetFilter( currID,
          FMainWindow.FiltersManager.GetFilterQuery( currID) // Current music filter query
          + ' AND NOT ' + AudiobooksQuery//Exlude audiobooks
          + ' AND NOT ' + PodcastQuery); //Exclude podcasts
      end
    end;
TagsNo tags attached.
Fixed in build1092

Activities

Ludek

2007-10-23 16:48

developer   ~0011488

Fixed in build 1092.

rusty

2007-10-26 17:18

administrator   ~0011594

Verified 1094.