Criteria = "Create TABLE Selectedsongs AS Select * from Songs left join Artists on Artists.Artist_ID = songs.Artist_ID left join AlbumSongs On AlbumSongs.Song_ID = Songs.Song_ID LEFT JOIN Albums ON Albums.Album_ID = AlbumSongs.Album_ID where Songs.Artist_ID = " + Str(FilterArtistID) + ";"
Criteria = "Create TEMPORARY TABLE Selectedsongs AS Select * from Songs left join Artists on Artists.Artist_ID = songs.Artist_ID left join AlbumSongs On AlbumSongs.Song_ID = Songs.Song_ID LEFT JOIN Albums ON Albums.Album_ID = AlbumSongs.Album_ID where Songs.Artist_ID = " + Str(FilterArtistID) + ";"
The first creates a normal table no bother but doing the TEMPORARY keyword creates nothing and raises no database errors.
Any ideas?
Both statements work ok with DB browser.
Any intelligent fool can make things bigger and more complex. It takes a touch of genius — and a lot of courage to move in the opposite direction.
CREATE TEMPORARY TABLE creates a temp file on the disk.
Unfortunately I don't know where. Maybe it is a rights problem, so that sqlite can not create the file.
The temporary table is created in a temp folder but is only accessible from the connection that created it.
So with me using PB to create the temp table then closing the connection deleted the file. Also looking at the DB with DBbrowser it is a different connection so cannot be seen.
Regards
CD
Any intelligent fool can make things bigger and more complex. It takes a touch of genius — and a lot of courage to move in the opposite direction.