Article View: borland.public.cppbuilder.database.multi-tier
Article #1680Re: MTS and BDE
From: Harold Howe [TeamB]
Date: Mon, 26 Jul 1999 00:00
Date: Mon, 26 Jul 1999 00:00
50 lines
2419 bytes
2419 bytes
Stewart Clark wrote: > 1st Problem: What to Create? > > Do I create an MTS Object for my "Business Logic" and an MTS Data Module for > the DB in the same DLL? I'm not an MTS expert, but I play one on TV. If your MTS object is for a database object, then I believe that you run the MTS data module wizard. This will require that you have an ActiveX library open. If you don't, then the wizard will create one for you. The MTS object also adds something to an ActiveX library, but you don't end up with a datamodule in your library. > OR do I Create only an :MTS Data Object and add a number of Methods to the > object for my "Business Logic"? You can do that, but you lose the visual design features for tables queries and such. > > 2nd Problem: When I create an MTS Data Object (using the wizard), I notice > that the wizard does not create any code to instantiate the MTS Data Object. > Where should I do that? The code that instantiates the MTS object goes in the client. The code that queries your tables goes in the methods of your MTS object. Activate and Deactive are there for you to use. They behave like constructors and destructors for your MTS object. You can query the database in Activate if you want to. > or should I do it in the constructor for the ....Impl class? According to an MTS discussion that Robert West gave at the conference, you should avoid using the constructor of an MTS object, because you are not really sure when the object will be destroyed and created, or when it will be pooled (I might be distorting his explanation). Anyway, use Activate and Deactivate. > Or does it just happen??? From the client side, creating an MTS object is not really any different than creating a non-mts object. On the server side, things are much different. Harold Howe [TeamB] http://www.bcbdev.com
Technical Details
Message-ID:
<379D3984.436F1BDD@bcbdev.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<7mlilh$66r3@forums.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fcd2b,b0afbaf7a2343151 X-Google-Attributes: gidfcd2b,public From: "Harold Howe [TeamB]" <hhowe@bcbdev.com> Subject: Re: MTS and BDE Date: 1999/07/26 Message-ID: <379D3984.436F1BDD@bcbdev.com> X-Deja-AN: 505648785 Content-Transfer-Encoding: 7bit References: <7mlilh$66r3@forums.borland.com> Organization: Another Netscape Collabra Server User Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 Newsgroups: borland.public.cppbuilder.database.multi-tier