| View previous topic :: View next topic |
| Author |
Message |
Bill N Guest
|
Posted: Wed Feb 18, 2004 2:47 pm Post subject: Is it possible to pass a TADOConnection to a Delphi Built DL |
|
|
I want to call a function in a Delphi built DLL that creates a report.
However, the report is already resource extensive and I don't want to take
time to initialize a database connection by passing a connection string. Is
there a way to pass a TADOConnection that is already connected (Connected :=
True;) to the DLL?
Thanks,
Bill N
|
|
| Back to top |
|
 |
Mike Walsh Guest
|
Posted: Thu Feb 19, 2004 3:34 pm Post subject: Re: Is it possible to pass a TADOConnection to a Delphi Buil |
|
|
"Bill N" <billnielsen (AT) hotmail (DOT) com> wrote
| Quote: | I want to call a function in a Delphi built DLL that creates a report.
However, the report is already resource extensive and I don't want to take
time to initialize a database connection by passing a connection string.
Is
there a way to pass a TADOConnection that is already connected (Connected
:=
True;) to the DLL?
Thanks,
Bill N
|
Bill,
The tadoconnection component has a property called connectionobject. Pass
that to the dll and have the dll assign it to it's tadoconnectionobjects
connectionobject.
Mike Walsh
|
|
| Back to top |
|
 |
tony Guest
|
Posted: Fri Feb 20, 2004 1:46 am Post subject: Re: Is it possible to pass a TADOConnection to a Delphi Buil |
|
|
I am looking for sample code or articles relate to this issue, how could I
pass a connection object within packages (BPL)?
thanks in advance.
(Connected :=
| Quote: | True;) to the DLL?
If you are calling the dll from a Delphi App you should just change to
using a
Package instead of a DLL. That way you can share the TadoConnection
--
Brian Bushay (TeamB)
[email]Bbushay (AT) NMPLS (DOT) com[/email]
|
|
|
| Back to top |
|
 |
tony Guest
|
Posted: Fri Feb 20, 2004 3:32 pm Post subject: Re: Is it possible to pass a TADOConnection to a Delphi Buil |
|
|
Hi,
How about in design time? How could I use the TADOConnection VCL in another
package?
Thanks in advance
| Quote: | I am looking for sample code or articles relate to this issue, how could
I
pass a connection object within packages (BPL)?
Pass it like you would to any method in your Exe. When you use a package
you
can treat it just like a module of your code.
--
Brian Bushay (TeamB)
[email]Bbushay (AT) NMPLS (DOT) com[/email]
|
|
|
| Back to top |
|
 |
|