I’m trying to connect to a SQLite database to store, access, and browse metadata in M4L.
I followed this: (http://cycling74.com/2008/09/05/data-collection-building-databases-using-sqlite/) and I am under the impression that when you call opendb() with the .js file configured the way it is in the tutorial that opendb() should create a new .db file at the path that you specify in the first argument.
However it doesn’t appear that the opendb() function actually creates a file on my hard drive. If I open the help patcher from the tutorial and click on the opendb() message box without changing anything it will create a database which I can query. All of the messages that pass in sql queries work but it is always a db in memory. I have also tried giving it specific path names and changing the Boolean second argument for opendb() back and forth with no change. I have also tried opening an existing sqlite database with every combination of path syntax (e.g. C:path/file.db, C:pathfile.db, C:\path\file.db, C:/path/file, etc) that I could dream up but every time the opendb() function creates a table in memory that is completely gone (un-query-able is what I mean, there is never a file that shows up obviously) when I call the closedb() function.
I’m on Windows 7 64 bit using M4L 6. I hope someone can help because I’m pretty stumped on what to look for next.
Background: I’m currently using Media Monkey to manage all of my music files and I want to be able to access the metadata that I create in MediaMonkey in M4L. Media Monkey uses a sqlite 3 database which I can query using SQLite Administrator without issue. I want to query that database from M4L so I can find music/video/.als/.alc files in Ableton based on their tags in the Media Monkey database. I know the queries that I want to run and I have a rough idea of what I want my interface to be but first I need to be able to connect to the MM database, or any file based database which is where my problem is.
I actually found the solution to my problem. I don’t know exactly what the big issue was with the path I was providing but I use the patcher that Andrew Benson posted in this thread: http://cycling74.com/forums/topic.php?id=31799
I pointed the folder from that patcher to the base C: drive and it was able to create a DB there. I then noticed an issue with the file name I was giving the opendb() function. I also think case sensitivity is something to be careful with if anyone else runs across this issue.
Forums > Max For Live