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

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

Moderators: Peke, Gurus

Teknojnky
Posts: 5537
Joined: Tue Sep 06, 2005 11:01 pm
Contact:

Post by Teknojnky »

well, all I actually suggesting is trying to avoid opening a separate app (the text editor) to input the query string
SpOiLeR
Posts: 14
Joined: Fri Dec 05, 2003 4:57 pm

Post by SpOiLeR »

Sooooo helpfull!!! Many thanx for this one...
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post by trixmoto »

I agree, although for complex statements the textfile is obviously essential, it would be nice to have the option of entering a small query in the window itself instead of having to go back to the textfile each time.
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.
Bex
Posts: 6316
Joined: Fri May 21, 2004 5:44 am
Location: Sweden

Post by Bex »

I'll see what I can do. I don't know when though...
Advanced Duplicate Find & Fix Find More From Same - Custom Search. | Transfer PlayStat & Copy-Paste Tags/AlbumArt between any tracks.
Tagging Inconsistencies Do you think you have your tags in order? Think again...
Play History & Stats Node Like having your Last-FM account stored locally, but more advanced.
Case & Leading Zero Fixer Works on filenames too!

All My Scripts
mp3_monkey
Posts: 68
Joined: Wed Jan 10, 2007 7:52 pm

Post by mp3_monkey »

I installed Statement1.sql, in the MediaMonkey/Scripts directory, ran MM , and pressed CTRL+F9 but I got nothing.

Is there another step needed to enable scripts ?? ... this would be my first!
mp3_monkey
Posts: 68
Joined: Wed Jan 10, 2007 7:52 pm

Post by mp3_monkey »

okay I foind the missing step ...updating the scripts.ini file to enclude something like this:

[ExecuteSQL]
FileName=SqlViewer.vbs
ProcName=SqlViewer
Order=40
DisplayName=Allows SQL commands...
Description=Allows SQL commands specified in Statement1.sql to be executed
Language=VBScript
ScriptType=0

I now see and can run the script from Tools\Scripts .... but how do I get Control F9 to work?
mp3_monkey
Posts: 68
Joined: Wed Jan 10, 2007 7:52 pm

Post by mp3_monkey »

okay found it...Tools\Options\Hotkeys...
RedX
Posts: 366
Joined: Wed Dec 27, 2006 10:32 am
Location: Germany

Post by RedX »

mp3_monkey wrote:okay I foind the missing step ...updating the scripts.ini file to enclude something like this:

[ExecuteSQL]
FileName=SqlViewer.vbs
ProcName=SqlViewer
Order=40
DisplayName=Allows SQL commands...
Description=Allows SQL commands specified in Statement1.sql to be executed
Language=VBScript
ScriptType=0

I now see and can run the script from Tools\Scripts .... but how do I get Control F9 to work?
Why didn't you use the installer?
Bex
Posts: 6316
Joined: Fri May 21, 2004 5:44 am
Location: Sweden

Post by Bex »

mp3_monkey,

IE actually renames the mmip file to zip and make it "unusable". It's sort of fixed now so undo everything you've done. Download and install the script again using the installer. Then it should work as intended.

(Check out Firefox or Opera, they are great alternatives to IE.)

RedX,
That's why...
Advanced Duplicate Find & Fix Find More From Same - Custom Search. | Transfer PlayStat & Copy-Paste Tags/AlbumArt between any tracks.
Tagging Inconsistencies Do you think you have your tags in order? Think again...
Play History & Stats Node Like having your Last-FM account stored locally, but more advanced.
Case & Leading Zero Fixer Works on filenames too!

All My Scripts
mp3_monkey
Posts: 68
Joined: Wed Jan 10, 2007 7:52 pm

Post by mp3_monkey »

many thanks... installs correctly now.
mp3_monkey
Posts: 68
Joined: Wed Jan 10, 2007 7:52 pm

Syntax question

Post by mp3_monkey »

I want to change IDMedia to 47 for all records.

I tried UPDATE Songs SET IDMedia ='47' in the Statement1.sql file, but it didnt work. (Error is :No SELECT or FROM keyword detected.)

What is the correct syntax??
Bex
Posts: 6316
Joined: Fri May 21, 2004 5:44 am
Location: Sweden

Post by Bex »

Currently no DML/DDL is supported. It will be when next version of MM is released. In the meantime I recommend SQLite Spy for updates of numerical fields. If you want to update text fields it's best to wait.
Advanced Duplicate Find & Fix Find More From Same - Custom Search. | Transfer PlayStat & Copy-Paste Tags/AlbumArt between any tracks.
Tagging Inconsistencies Do you think you have your tags in order? Think again...
Play History & Stats Node Like having your Last-FM account stored locally, but more advanced.
Case & Leading Zero Fixer Works on filenames too!

All My Scripts
Guest

Post by Guest »

Hmmm, I so confused!

Throughout this forum, MM3 users are making changes to the database (I assume thru scripts or external editors). How do they do this? eg: http://www.mediamonkey.com/forum/viewtopic.php?t=24988

Would like to start learning.
mp3_monkey
Posts: 68
Joined: Wed Jan 10, 2007 7:52 pm

Post by mp3_monkey »

Bex wrote:Currently no DML/DDL is supported. It will be when next version of MM is released. In the meantime I recommend SQLite Spy for updates of numerical fields. If you want to update text fields it's best to wait.

Actually I have, and started off with SQLite Spy and got into problems : http://www.mediamonkey.com/forum/viewtopic.php?t=24951 So then I thought I would check out the scripts..where it is suggested I go back to SQLite Spy ! So I'm not making much progress!

Would like to know what scripts I can use to change IDMedia and SongPath....or what I need to do with SQLite that would enable me to make changes without the unicode error messages.

Numeric field
My 'need' is as follows. I have 4 computers. All are setup identical ( eg C:\users\public\users. Each week they are all synced up so that they each locally have the same music library and the same database. It all works fine except I need to change the mm.db on each machine, each week, to reflect the correct ID Media number. ( I used to do this no problem with an automated update query Access, but cant use it anymore....hence my desire to learn more about scripts or SQLite.

Text field
The need for changes to SongPath is only on some computers where I need to specify a different location for the media files, ie D:\ or E:\ drive instead of C. Again, the automated Access update query used to take care of it for me.

Any guidance would be really appreciated. Love the product , but starting to get frustrated.
Last edited by mp3_monkey on Thu Jan 17, 2008 4:53 am, edited 1 time in total.
mp3_monkey
Posts: 68
Joined: Wed Jan 10, 2007 7:52 pm

Post by mp3_monkey »

Bex wrote:In the meantime I recommend SQLite Spy for updates of numerical fields. If you want to update text fields it's best to wait.

For text fields, for now, where I need to globally change SongPath, I can do it manually with Auto Organize Function.

For numeric fields, like IDMedia, you inidcated that updates should work with SQLite Spy....but when I try it, I get the IUNICODE errors. So whats the trick to get updates on numeric flelds to work?
Post Reply