BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Is it possible to pass a TADOConnection to a Delphi Built DL

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (ADO)
View previous topic :: View next topic  
Author Message
Bill N
Guest





PostPosted: Wed Feb 18, 2004 2:47 pm    Post subject: Is it possible to pass a TADOConnection to a Delphi Built DL Reply with 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


Back to top
Mike Walsh
Guest





PostPosted: Thu Feb 19, 2004 3:34 pm    Post subject: Re: Is it possible to pass a TADOConnection to a Delphi Buil Reply with quote




"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





PostPosted: Fri Feb 20, 2004 1:46 am    Post subject: Re: Is it possible to pass a TADOConnection to a Delphi Buil Reply with quote



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





PostPosted: Fri Feb 20, 2004 3:32 pm    Post subject: Re: Is it possible to pass a TADOConnection to a Delphi Buil Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (ADO) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.