Guest Posted April 6, 2011 Share Posted April 6, 2011 Message from: "Anders E. Andersen" I have a legacy paradox database that I need to connect to using BDE components. Should I put a TDatabase connection in MainModule along with a TSession in mainmodule as well or can I put the TDatabase in the server module and use a TSession on MainModule that connects to the server module. I believe that using one TSession per thread should work, from what I have read elsewhere regarding general BDE use, so I would think that using one TDatabase would be the most efficient way to do it. - Anders . Quote Link to comment Share on other sites More sharing options...
Guest Posted April 6, 2011 Author Share Posted April 6, 2011 Message from: "Anders E. Andersen" Den 06-04-2011 14:42, Anders E. Andersen skrev: > I have a legacy paradox database that I need to connect to using BDE > components. > > Should I put a TDatabase connection in MainModule along with a TSession > in mainmodule as well or can I put the TDatabase in the server module > and use a TSession on MainModule that connects to the server module. > > I believe that using one TSession per thread should work, from what I > have read elsewhere regarding general BDE use, so I would think that > using one TDatabase would be the most efficient way to do it. > > - Anders Hmm.. I hate answering my own questions. However it seems that TDatabase is subordinate to TSession, so you need at least one TDatabase for each TSession. Thus both must be on the MainModule and you need one connection per (web)session. - Anders . Quote Link to comment Share on other sites More sharing options...
Guest Posted April 6, 2011 Author Share Posted April 6, 2011 Message from: "Farshad Mohajeri" You need a TSession on MainModule with AutoSessionName set to True. You can also add a TDataBase too, but I don't know if it is really required. I've used BDE in TSession + TTable/TQuery manner in the past in multi-threaded apps. Of course, BDE has other problems. You may also need to increase the SHAREDMEMSIZE parameter in BDEConfig. "Anders E. Andersen" wrote in message news:iyuGuoF9LHA.3152@anaxagvs227... > Den 06-04-2011 14:42, Anders E. Andersen skrev: >> I have a legacy paradox database that I need to connect to using BDE >> components. >> >> Should I put a TDatabase connection in MainModule along with a TSession >> in mainmodule as well or can I put the TDatabase in the server module >> and use a TSession on MainModule that connects to the server module. >> >> I believe that using one TSession per thread should work, from what I >> have read elsewhere regarding general BDE use, so I would think that >> using one TDatabase would be the most efficient way to do it. >> >> - Anders > > Hmm.. I hate answering my own questions. However it seems that TDatabase > is subordinate to TSession, so you need at least one TDatabase for each > TSession. Thus both must be on the MainModule and you need one connection > per (web)session. > > - Anders . Quote Link to comment Share on other sites More sharing options...
Guest Posted April 6, 2011 Author Share Posted April 6, 2011 Message from: "Anders E. Andersen" Den 06-04-2011 15:07, Farshad Mohajeri skrev: > You need a TSession on MainModule with AutoSessionName set to True. You can > also add a TDataBase too, but I don't know if it is really required. If you are not using TDatabase, wouldn't you have to use absolute paths to tables in TTable/TQuery? > I've used BDE in TSession + TTable/TQuery manner in the past in > multi-threaded apps. Of course, BDE has other problems. You may also need to > increase the SHAREDMEMSIZE parameter in BDEConfig. I would rather not use BDE as well. But sometimes you are bound by circumstances. The BDE configuration is already optimized pretty aggressively, so that should not be an issue. - Anders . Quote Link to comment Share on other sites More sharing options...
Guest Posted April 6, 2011 Author Share Posted April 6, 2011 Message from: "Farshad Mohajeri" "Anders E. Andersen" wrote in message news:X%23TABCG9LHA.3152@anaxagvs227... > Den 06-04-2011 15:07, Farshad Mohajeri skrev: >> You need a TSession on MainModule with AutoSessionName set to True. You >> can >> also add a TDataBase too, but I don't know if it is really required. > > If you are not using TDatabase, wouldn't you have to use absolute paths to > tables in TTable/TQuery? Yes. You must assign a Path to Database property of TTable/TQuery. . Quote Link to comment Share on other sites More sharing options...
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.