Right now, I’ve got a GamersDB class which has methods to to access my database. I feel like this might be a bit slow, as I’m dimming the db class every time I try to lookup a record, and there are about 30 database calls on startup of my app.
Now, the question at hand:
Is there a way to put this in my App.open Event handler and access it from other classes?
Dim db As GamerDB
db = new GamerDB()
Or should I continue to instantiate every time to use db.find() method?
So is there a way to set a Module property with parameters?
Dim client As new MongoDriver.MongoClient(getDBHost, getDBPort)
I tried setting a property of “client” as “MongoDriver.MongoClient” for the module, but then it doesn’t work because of the two parameters I’m not passing (host, port).