DB query limits

Download and get help for different MediaMonkey for Windows 4 Addons.

Moderators: Peke, Gurus

parkint
Posts: 16
Joined: Sat Oct 09, 2004 1:54 am

DB query limits

Post by parkint »

Sorry in advance for the vague post. I tend to use PHP to access MM via COM, as I prefer PHP and haven't been able to make the PHP ActiveScript SAPI work under MM. I don't really think that has so much bearing on my question though.

I wrote a couple of quick one-shot scripts to run through the database and change initial case of certain words (of, the, and ... etc) for both albums and songs. I basically did this in a very ugly way, by using and OpenSQL query to grab the whole list, iterate through it then call an ExecSQL with an update query. The album script completed fine, however the songs script kept generating an error from MM:

There was a problem querying the database.
HY001: [Microsoft][ODBC Microsoft Access Driver] Cannot open any more tables.
Cancel Retry Ignore

This prompted a full shutdown and restart of MM to allow any further runs of the script. I did just keep running the script until eventually it fixed all the songs in the DB anyhow, and I didn't do anything smart like work out whether it crashed at a prticular number of songs or anything.

I guess the question is, is MM closing down DB handles properly after an ExecSQL call? Can anybody shed any light on this?
jmaver
Posts: 92
Joined: Thu Feb 19, 2004 10:26 am

Post by jmaver »

I am having this same problem when calling OpenSQL from my c# program. After a while I get the same error, and have to shut down. Is there a way to force the tables to close?
jiri
Posts: 5419
Joined: Tue Aug 14, 2001 7:00 pm
Location: Czech Republic
Contact:

Post by jiri »

Ooops, now I see, MM really doesn't close everything properly after ExecSQL command. This will be fixed in the next release.

Jiri
jmaver
Posts: 92
Joined: Thu Feb 19, 2004 10:26 am

Post by jmaver »

I found doing a GC.Collect after setting my SDBSongIterator and SDBSongData objects to null prevents me from getting that error anymore with QuerySongs.
Post Reply