Search code examples
c#visual-studio-2008db4o

isn't the db4o .OpenFile method supposed to create the filestructure if it doesn't exist?


When using Db4oFactiory.OpenFile("somename"); it was trying to drop the folder "somename" into the visual studio directory and getting denied permission. I solved this by giving it an absolute path:

        db = Db4oFactory.OpenFile("E:/test-projects/db4o/db");

and now I'm catching a FileNotFoundException but the db4o docs explicitly say that if there isnt a db already in play, that OpenFile will generate them. What am I missing?

Thanks!


Solution

  • Apparently you have to suffix a file extension. I was thinking that it would need more than one file and thus need a directory.