AntonioCuomo Posted October 8, 2017 Posted October 8, 2017 If j have a TABSDATABASE on unimainmodule the component is shared with all session? How have a TBSDATABASE for every session? Example: User1 ---> DB0001.abs User2 ----> DB0002.abs User3 ----> DB0003.abs .... if j change at connession the filename for all user the DB is the DB of last user. Is ABsolute Database not compatible? Quote
bolossis Posted October 8, 2017 Posted October 8, 2017 I have the same problem. Im waiting also for an answer.... http://forums.unigui.com/index.php?/topic/7000-absolute-database If you find any solution please post it Quote
bbosnjak Posted October 9, 2017 Posted October 9, 2017 My understanding (from the online UniGui documentation) is that the ServerModule exists for all sessions while the MainModule is created separately for each session. So if you put a database connection in MainModule, it will be specific to one user and session. I may be wrong, but I think a database connection in ServerModule is not recommended. Sent from my SM-P900 using Tapatalk Quote
AntonioCuomo Posted October 9, 2017 Author Posted October 9, 2017 The link a database is on Mainmodule. j tested also with a link on Datamdule. Probabily the absolute not is multi thread? Quote
Administrators Farshad Mohajeri Posted October 9, 2017 Administrators Posted October 9, 2017 Hi, You must follow same principle when you use BDE in a multi-threaded app. Basically you must have a separate TABSSession object for each uniGUI session. See here: http://www.componentace.com/multi-thread-delphi.htm Put a TABSSession on MainModule and set AutoSessionName -> True. Put a TABSDatabase on MainModule and set its SessionName to TABSSession.Session name. . . . Quote
Administrators Farshad Mohajeri Posted October 9, 2017 Administrators Posted October 9, 2017 If j have a TABSDATABASE on unimainmodule the component is shared with all session? How have a TBSDATABASE for every session? Example: User1 ---> DB0001.abs User2 ----> DB0002.abs User3 ----> DB0003.abs .... if j change at connession the filename for all user the DB is the DB of last user. Is ABsolute Database not compatible? In a normal app all users must share same ABS database file. Quote
bolossis Posted October 9, 2017 Posted October 9, 2017 Correct!!! I have put an ABSSession in UniMainModule Form and assigned the Session Name to ABSDatabase. Now every time UniMainModule is created (= new user) then a new session is created and the database works perfect! **Note you have to put the database inside the isapi dll folder. UniMainModule.ABSDatabase1.close; UniMainModule.ABSDatabase1.DatabaseFileName := UniServerModule.FilesFolderPath + 'TestFolder/Novus_Conceptus.abs' ; UniMainModule.ABSDatabase1.Open; Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.