Wow - once again for your help. I used this script for 7 years now!!! But: now we git a new PC and I installed MM 4. And now I ran into problems with the old script

.
When I start the script I got this error message:
Error executing SQL "SELECT TOP 1 Songs.ID, Rnd(-462*Songs.ID) FROM Songs INNER JOIN Genres ON Songs.Genre = Genres.IDGenre WHERE Genres.GenreName = '5-Samba' AND Rating>=-20 ORDER BY 2" : near "1": syntax error (1, 1)
And this is, what the script says in this line:
Code: Select all
SQL = "SELECT TOP 1 Songs.ID, Rnd(" & -1 * RandomNumber & "*Songs.ID) FROM Songs INNER JOIN Genres ON Songs.Genre = Genres.IDGenre WHERE Genres.GenreName = '" & strGenreName & "' AND Rating>="&MinRating*20&" ORDER BY 2"
On the old PC with MM 2, the script worked fine. Can you give me a hint, why it does not on MM 4?
Thank you,
Pete