The problem is that the script assumes that the IDAlbum column has values in the range [0, number of albums]. This is not true, at least not in my database. In fact the first ID is 1750.
The fix would be to change the first part to
Code: Select all
'select random album
Dim sql, iter, max
sql = "SELECT Min(ID) As Lowest, Max(ID) As Highest FROM Albums where ID > 0"
Set iter = SDB.Database.OpenSQL(sql)
min = CLng(iter.StringByName("Lowest"))
max = CLng(iter.StringByName("Highest"))
Code: Select all
ind = Int(max*Rnd)+1+min
Hope this helps, it now works on my MediaMonkey with this modification.
Abel