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

Download and get help for different MediaMonkey Addons.

Moderators: Peke, Gurus

Postby Teknojnky » Mon Jan 14, 2008 2:55 pm

well, all I actually suggesting is trying to avoid opening a separate app (the text editor) to input the query string
Teknojnky
 
Posts: 5509
Joined: Tue Sep 06, 2005 11:01 pm

Postby SpOiLeR » Mon Jan 14, 2008 2:56 pm

Sooooo helpfull!!! Many thanx for this one...
SpOiLeR
 
Posts: 14
Joined: Fri Dec 05, 2003 4:57 pm

Postby trixmoto » Mon Jan 14, 2008 3:33 pm

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 trixmoto.net. If you're interested, check out my Uniface blog.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.

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

Postby Bex » Mon Jan 14, 2008 4:27 pm

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
Bex
 
Posts: 6316
Joined: Fri May 21, 2004 5:44 am
Location: Sweden

Postby mp3_monkey » Tue Jan 15, 2008 11:51 pm

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

Postby mp3_monkey » Wed Jan 16, 2008 4:12 am

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

Postby mp3_monkey » Wed Jan 16, 2008 4:16 am

okay found it...Tools\Options\Hotkeys...
mp3_monkey
 
Posts: 68
Joined: Wed Jan 10, 2007 7:52 pm

Postby RedX » Wed Jan 16, 2008 4:27 am

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?
RedX
 
Posts: 366
Joined: Wed Dec 27, 2006 10:32 am
Location: Germany

Postby Bex » Wed Jan 16, 2008 4:48 am

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
Bex
 
Posts: 6316
Joined: Fri May 21, 2004 5:44 am
Location: Sweden

Postby mp3_monkey » Wed Jan 16, 2008 6:47 am

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

Syntax question

Postby mp3_monkey » Wed Jan 16, 2008 7:12 pm

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??
mp3_monkey
 
Posts: 68
Joined: Wed Jan 10, 2007 7:52 pm

Postby Bex » Wed Jan 16, 2008 10:27 pm

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
Bex
 
Posts: 6316
Joined: Fri May 21, 2004 5:44 am
Location: Sweden

Postby Guest » Wed Jan 16, 2008 11:40 pm

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.
Guest
 

Postby mp3_monkey » Thu Jan 17, 2008 12:15 am

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

Postby mp3_monkey » Thu Jan 17, 2008 4:50 am

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?
mp3_monkey
 
Posts: 68
Joined: Wed Jan 10, 2007 7:52 pm

PreviousNext

Return to Need Help with Addons?

Who is online

Users browsing this forum: Bing [Bot] and 15 guests