Getting new database into correct folder (1 Viewer)

JRNeher

Portal Member
August 29, 2005
17
0
I have a plugin which has to create a new database. The plugin opens and reads a file and then writes information to the database. I cannot get the database to be created in the right folder. When I select the file to put into the database, the database folder is created in the same place that the file I opened is in. How would I get the database to be created in the MP database folder with all of the other databases (like tv, music, etc)? Any help on this would be much appreciated. Thanks!

Jake
 

samuel337

Portal Pro
August 25, 2004
772
0
Melbourne, Australia
How are you creating the database?

I mean, if you want the database to be in the MediaPortal\Databases folder, then just create it in there... I think you have a problem with relative paths. Use Environment.ExecutablePath (I think that's what the property is called) to get the path to the MediaPortal folder, then append \database on to it.

Sam
 

Users who are viewing this thread

Top Bottom