SQL-Viewer 2.4 [Script] 2009-10-25

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

Moderators: Peke, Gurus

bonjo
Posts: 32
Joined: Mon Jan 01, 2007 11:44 am

Re: SQL-Viewer 2.4 [Script] 2009-10-25

Post by bonjo »

A few minutes. It "took some time" means compared to the wrong code :wink:
skj88
Posts: 17
Joined: Sat Jul 02, 2011 10:44 am

Re: SQL-Viewer 2.4 [Script] 2009-10-25

Post by skj88 »

I am trying to get this to work with adding new Genres. I can get a new Genre to add to the Songs table, but once I rescan my library, the new genre disappears. I tried adding the new Genre to the Songs table, Genres table and the link between the song and new genre in the GenresSongs table, but still the new Genre disappears when I rescan the library.

Any suggestions for adding new Genres with SQL?

Thanks

Steve
nynaevelan
Posts: 5559
Joined: Wed Feb 07, 2007 11:07 pm
Location: New Jersey, USA
Contact:

Re: SQL-Viewer 2.4 [Script] 2009-10-25

Post by nynaevelan »

Out of curiosity wouldn't it be easier to add the genre's via the native MM way? But using this script, what sql are you using, are you sure the tags are being saved with the new genre's?? Try syncronizing them after you run the sql.
3.2x - Win7 Ultimate (Zen Touch 2 16 GB/Zen 8GB)
Link to Favorite Scripts/Skins

Join Dropbox, the online site to share your files
skj88
Posts: 17
Joined: Sat Jul 02, 2011 10:44 am

Re: SQL-Viewer 2.4 [Script] 2009-10-25

Post by skj88 »

Actually no, it's not easier to update Genres in MM manually when you have several thousand of them. Isn't that the point of scripts? I can handle doing some manually, but not thousands.

I gave up on SQL and am trying UpdateDB and WriteTags methods with no luck. I will start another thread to try to figure it out.
nynaevelan
Posts: 5559
Joined: Wed Feb 07, 2007 11:07 pm
Location: New Jersey, USA
Contact:

Re: SQL-Viewer 2.4 [Script] 2009-10-25

Post by nynaevelan »

What are the steps you are using to accomplish this, perhaps with that information someone will be able to help you?
3.2x - Win7 Ultimate (Zen Touch 2 16 GB/Zen 8GB)
Link to Favorite Scripts/Skins

Join Dropbox, the online site to share your files
Daneel
Posts: 5
Joined: Tue Sep 21, 2010 11:23 am

Re: SQL-Viewer 2.4 [Script] 2009-10-25

Post by Daneel »

hey

my first installation of media monkey 4 was good because i didnt know that it can be installed in portable mode . so i installed it and made it portable myself as i always do and nothing went wrong

the problem appeared when i wanted to install it on my other pc and this time i noticed the portable check box and i installed it on my previous portable folder .
this is what happened to the music paths in my library
Image

as you can see the start (shared) section of the path which was d:\media\audio\music has changed to [MUSIC] and i dont know how to fix it. i hoped that by writing a config line like this [music]=d:\media\audio\music\ would solve the problem but despite trying all the combinations i could guess , im still unable to fix this problem. please help

thanks in advance
Lost_in_space

Re: SQL-Viewer 2.4 [Script] 2009-10-25

Post by Lost_in_space »

Although I am aware that MM4 is long avail, i stick with MM3, coz i have life-licence for it.
To circumvent the IUnicode-Problem, i want to install SQLViewer, as it looks like that should do it.
Unfortunately, after hours of trying... no luck. I tried from the Admin's Desktop, also from mine with "Run as adminitrator". Everywhere it complains (after several seconds) like "invalid install package" (Message is localized). I even unzipped the mmip file and upped the version numbers to try that. - Did not help.
Can it be related with me using Win7x64 ? And after finally having moved to UNC pathname to avoid losing my DB regularly, since the Audio files reside on a network...
ALL of my Playlists now have invalid entries (basically lost), except if i was allowed to fix that on my own.

What can i do? My Collection is huge (>30,000 files) No way going in by hand!

Any recommendations? Please...

Oh, btw: just for kicks i tried several other mmips from this website and the problem was the same in every case.
But by searching for solutions to this problem, i couldnt find anything, not a single report. That is why i am asking for help now (in 2013!)
Lost_in_space

Re: SQL-Viewer 2.4 [Script] 2009-10-25

Post by Lost_in_space »

Oops, i forgot to mention: all the addons are actually visible from the extentions dialog. Only i couldnt find an interface to them. Maybe is was while trying to install that, that the error message got generated? And while looking at every Menu, Button, RMB ... Hot to GET THIS PARTY STARTED???
Nova5
Posts: 193
Joined: Fri Mar 10, 2006 11:33 pm

Re: SQL-Viewer 2.4 [Script] 2009-10-25

Post by Nova5 »

Lost_in_space wrote:Although I am aware that MM4 is long avail, i stick with MM3, coz i have life-licence for it.
To circumvent the IUnicode-Problem, i want to install SQLViewer, as it looks like that should do it.
Unfortunately, after hours of trying... no luck. I tried from the Admin's Desktop, also from mine with "Run as adminitrator". Everywhere it complains (after several seconds) like "invalid install package" (Message is localized). I even unzipped the mmip file and upped the version numbers to try that. - Did not help.
Can it be related with me using Win7x64 ? And after finally having moved to UNC pathname to avoid losing my DB regularly, since the Audio files reside on a network...
ALL of my Playlists now have invalid entries (basically lost), except if i was allowed to fix that on my own.

What can i do? My Collection is huge (>30,000 files) No way going in by hand!

Any recommendations? Please...

Oh, btw: just for kicks i tried several other mmips from this website and the problem was the same in every case.
But by searching for solutions to this problem, i couldnt find anything, not a single report. That is why i am asking for help now (in 2013!)

Lifetime License gives you full gold function of ANY MM version. So go for 4! Now if you only bought a cheaper MM3 version license.. sucks to be you. ;)
Lost_in_space

Re: SQL-Viewer 2.4 [Script] 2009-10-25

Post by Lost_in_space »

Ah, thx. Since i wasnt sure, i gave it a try:
License isnt valid for 4.0. :-( And then it didnt upgrade anyway, neither did it know, where my MM.DB resides, nor my music collection. And it failed to adapt the localisation. So i reverted from a backup to the 3.0 state. Still sitting duck when it comes to my playlist problem. They have all been invalidated since i applied the suggestion from this forum to use UNC for network drives. (Which solved one big problem, but left me with a smaller one: hundreds of carefully maintained playlists basically gone if i do not find a way to programmatically adapt them with the new "location" of the files.
Yes, sucks to be me. ;-)
chrisjj
Posts: 5007
Joined: Wed Feb 14, 2007 5:14 pm
Location: UK

Re: SQL-Viewer 2.4 [Script] 2009-10-25

Post by chrisjj »

Odd that Execute... errors on SELECT:

Image
Chris
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Re: SQL-Viewer 2.4 [Script] 2009-10-25

Post by trixmoto »

There's two different buttons that work quite differently...

1) "Run Select Query" uses the OpenSQL method and should be used for running SELECT queries.

2) "Execute DDL/DML Statement" uses the ExecSQL method and should be used for UPDATE/INSERT/DELETE queries.

The reason you get the error is because a SELECT query returns data and the ExecSQL method does not allow this.
Download my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
chrisjj
Posts: 5007
Joined: Wed Feb 14, 2007 5:14 pm
Location: UK

Re: SQL-Viewer 2.4 [Script] 2009-10-25

Post by chrisjj »

Since SELECT is a DML statement, I was surprised "Execute DDL/DML Statement" failed to execute it.

Thanks for the explanation.

Perhaps it should be the program not the the user that chooses which method to call. The program would then offer a single Execute button, like other SQL tools.
Chris
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Re: SQL-Viewer 2.4 [Script] 2009-10-25

Post by trixmoto »

Yeah, Bex and I talked about that a while ago (probably years ago :-?). With string manipulation it can actually be pretty tricky to work out which is required for a complex SQL statement, and it's far too much work to try and build a tokenizer and all that nonsense just for this. The fact is that the MM API provides two different methods, so it's simplest to have a button for each, and the user (who should know what they're doing) can make the decision themselves - power to the user!
Download my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
chrisjj
Posts: 5007
Joined: Wed Feb 14, 2007 5:14 pm
Location: UK

Re: SQL-Viewer 2.4 [Script] 2009-10-25

Post by chrisjj »

trixmoto wrote:With string manipulation it can actually be pretty tricky to work out which is required for a complex SQL statement, and it's far too much work ...
Not just switch on the first keyword, then?
trixmoto wrote:The fact is that the MM API provides two different methods, so it's simplest to have a button for each, and the user (who should know what they're doing)
can make the decision themselves - power to the user!
Well, the user who knows what he is doing is not going to know what the program is doing whilst the program continues to mislead him with the label "Execute DDL/DML Statement".

Simplest is to accurately label the button. That is what is most useful to a user who knows what he is doing.
Chris
Post Reply