05-11-2011 01:47 AM
Hi @ all,
with the new navigator-object it's easy to connect to a database with the methods 'ConnectDataStore' or 'ConnectDataStoreByParameter'.
But how the connection may be closed?
In an AsamOds environment it's important to close the connection, because a part of the environment (the so called ORB) 'caches' some data (in the ActiveObjectMap). This 'cache' is cleaned up by closing the connection. So, the problem is, that without the possibility to close a connection, the cache will grow up (and in our way the Orb ist becoming instable and crashes after a while).
Thanks for reading 🙂
Greetings from Germany
Contur
Solved! Go to Solution.
05-12-2011 02:17 AM
Hi Contur,
the new ASAM-ODS API does not have an explicit close method. A store (and by this the connection held by this store) will be closed automatically when all references to this store are closed - which translates in VBS to set them to Nothing. In the simplest case this is the store itself:
dim myStore : set myStore = Navigator.ConnectDataStore("ASAM Pass Fail Analysis Example")
set myStore = Nothing
In the case your script helds any other references to that store, e.g. the results of a query or a certain element you need to set them to Nothing as well
dim myStore : set myStore = Navigator.ConnectDataStore("ASAM Pass Fail Analysis Example")
dim myRootElements : set myRootElements = myStore.RootElements
set myRootElements = Nothing
set myStore = Nothing
05-12-2011 02:34 AM
Hi Stefan,
big thanks for your reply.
I which you a nice day.
Greeting from Germany
Contur