|
My MIDAS server has strange bug - all TOCIQuery from different RDM are binded to first ... |
|
|
|
|
Sep 19, 2006 |
|
My MIDAS server has strange bug - all TOCIQuery from different RDM are binded to first TOCIDatabase from first created RDM. What is wrong ?
Because NCOCI8 uses for binding dataset with database DatabaseName property, NCOCI8 has the same problem as BDE. When new exemplar of remote datamodule is building, and it have TOCIDatabase, then all TOCIDataSet from it will be bind to TOCIDatabase not from the same datamodule, but to TOCIDatabase from FIRST datamodule. BDE's TSession has property AutoSessionName, if it is True, then TSession will handle this problem automatically - it will rename SessionName's in new datamodule. NCOCI8 has two choices for you: - use global variable NCOciDB.FOCIDatabaseNameExpandMode. If it equal to deUseThread, then components, that are living in different THREADS will have different DatabaseName's. If it equal deUseOwner, then components, that are living in different DATAMODULE's, will have different DatabaseName's. - use explicit control for how NCOCI8 will rename DatabaseName. You can include in DatabaseName special symbols, that will be expanded: %T - thread id %O - owner address The easiest way is to set FOCIDatabaseNameExpandMode := deUseThread in initialization section of remote datamodule. |