Board index » delphi » Passing ADOConnection, ADOQuery et al as interfaces to COM components

Passing ADOConnection, ADOQuery et al as interfaces to COM components

Hi all,

This is my first post on this group.
I am currently working on a project involving
an Oracle database. I am accessing this
database from Delphi 5 using ADO. I would like
to make all my non-visual objects available as
COM components through interfaces, so I could
later migrate to C++ or any other language if I
wanted, or access my business logic from other
applications.

Here is what I would like to accomplish:

(please view with courier new)
===================================================
|                DELPHI APPLICATION               |
+-------------------------------------------------+
|                      |                          |
|  EXECUTABLE (.exe)   |      LIBRARY (.dll)      |
|                      |                          |
|  User Interface      |  Business Classes and    |
|                      |  Persistence Layer       |
|                      |                          |
|  forms with VCL      |  Library should contain  |
|  compononents, data  |  the necessary code to   |
|  aware if possible   |  provide persistence.    |
|                      |                          |
==================================================+

My questions:

-  Is it possible to pass TADOConnection,
   TADOQuery or TADODataSet to COM components
   in a .dll?
-  If this is possible, how is it done? Do the
   ADO components inherit from some interface I
   could use?

-  Is it possible to use the VCL data-aware
   visual components with COM objects that reside
   in a .dll?
-  If this is possible how would you approach
   this problem?
-  I expect that other people might have faced
   this problem before, do you know of useful
   resources on this subject such as websites or
   other newsgroups?

Thank you very much for your time.

--
Stijn
OddesE_...@hotmail.com
http://OddesE.cjb.net
_________________________________________________
Remove _XYZ from my address when replying by mail

 

Re:Passing ADOConnection, ADOQuery et al as interfaces to COM components


I would look into Remote DataModules.

rb

Quote
"OddesE" <OddesE_...@hotmail.com> wrote in message news:3c9af94e_2@dnews...
> database from Delphi 5 using ADO. I would like
> to make all my non-visual objects available as
> COM components through interfaces, so I could
> later migrate to C++ or any other language if I
> wanted, or access my business logic from other
> applications.

Re:Passing ADOConnection, ADOQuery et al as interfaces to COM components


Quote
"rb" <raj...@killspam-sympatico.ca> wrote in message

news:3c9b04e4_2@dnews...
Quote
> "OddesE" <OddesE_...@hotmail.com> wrote in message

news:3c9af94e_2@dnews...

Quote
> > database from Delphi 5 using ADO. I would like
> > to make all my non-visual objects available as
> > COM components through interfaces, so I could
> > later migrate to C++ or any other language if I
> > wanted, or access my business logic from other
> > applications.

> I would look into Remote DataModules.

> rb

Could you elobarate on that some more?
I have never heard of remote datamodules?
Is it a new Delphi 6 feature or does Delphi 5
have them too? Thanks for your help.

--
Stijn
OddesE_...@hotmail.com
http://OddesE.cjb.net
________________________________________________________
Please remove _XYZ from my address when replying by mail

Re:Passing ADOConnection, ADOQuery et al as interfaces to COM components


Quote
"OddesE" <OddesE_...@hotmail.com> wrote in message news:3c9b2016_2@dnews...
> Could you elobarate on that some more?
> I have never heard of remote datamodules?
> Is it a new Delphi 6 feature or does Delphi 5
> have them too? Thanks for your help.

Actually, RDM's have been around for quite some time. What you're looking
for is information on MIDAS. Though it would be wrong to say that RDM's are
MIDAS, but for all intents and purposes you could say that. Oh yes, MIDAS is
renamed in D6 to Datasnap.

What you have to do is to read up on multi tier development (DDG,
Mastering), check out community site, www.distribucon.com and, if I'm not
mistaken, you can find quite a few articles on delphi.about.com.

To get you going, check 2 things: demos directory and
File->New->Other->Multitier tab.

Also, if you set yourself on that route, you want to check
delphi.public.datasnap and delphi.public.database.multi-tier groups.

Bonne chance.

rb

Other Threads