Speeding up ODBC operations by keeping the connection open: Difference between revisions

From Planimate Knowledge Base
Jump to navigation Jump to search
m (1 revision(s))
No edit summary
 
Line 1: Line 1:
<font face="MS Sans Serif"> Have implemented an option in ODBC Read to leave the database open after<br /> the operation. This retains the connection to the DSN. If the same DSN<br /> is required again, the cached connection will be used and will be much<br /> quicker than opening a new one.
Have implemented an option in ODBC Read to leave the database open after<br /> the operation. This retains the connection to the DSN. If the same DSN<br /> is required again, the cached connection will be used and will be much<br /> quicker than opening a new one.
 


To keep a particular connection open over multiple change objects, each<br /> change object using that DSN must have the "Keep Open" option on.
To keep a particular connection open over multiple change objects, each<br /> change object using that DSN must have the "Keep Open" option on.


Only one DSN can be kept open, a new one will override an older one.
Only one DSN can be kept open, a new one will override an older one.


However if a second DSN is accessed while an existing DSN has been cached<br /> AND the KeepOpen option is not on for the second DSN, the original DSN<br /> will remain cached/open.


However if a second DSN is accessed while an existing DSN has been cached<br /> AND the KeepOpen option is not on for the second DSN, the original DSN<br /> will remain cached/open.
Future Planimate versions may support caching multiple DSNs.


A modeller should close a DSN (by making the last access to it from a<br /> change object without the KeepOpen() option. Not doing so is not good<br /> practice and a warning will be logged to the Planimate debug file when<br /> the model is closed
----


Future Planimate versions may support caching multiple DSNs.


<font size="2">idkbase note 40</font>


A modeller should close a DSN (by making the last access to it from a<br /> change object without the KeepOpen() option. Not doing so is not good<br /> practice and a warning will be logged to the Planimate debug file when<br /> the model is closed.<br /> </font>
----
[[Category:Database (ODBC)]]
[[Category:Object/Change]]
[[Category:Object/Change]]
<font size="2">idkbase note 40</font>
[[Category:Data/Exchange]]

Latest revision as of 02:53, 13 January 2008

Have implemented an option in ODBC Read to leave the database open after
the operation. This retains the connection to the DSN. If the same DSN
is required again, the cached connection will be used and will be much
quicker than opening a new one.

To keep a particular connection open over multiple change objects, each
change object using that DSN must have the "Keep Open" option on.

Only one DSN can be kept open, a new one will override an older one.

However if a second DSN is accessed while an existing DSN has been cached
AND the KeepOpen option is not on for the second DSN, the original DSN
will remain cached/open.

Future Planimate versions may support caching multiple DSNs.

A modeller should close a DSN (by making the last access to it from a
change object without the KeepOpen() option. Not doing so is not good
practice and a warning will be logged to the Planimate debug file when
the model is closed



idkbase note 40