I
think you'll find that the Tdataset has a db handle property. If a query is cast
as TDataset, you can then set its DB Handle to the Databases Handle ... and
apparently it will work. If you can wait day or two, I'll rummage up the
source code example I found for this ... though I cannot say if it actually
works.
But,
if someone else more knowlegeable has the solution/ example ...I too would be
interested to see it before I leap in.
James
Low
Baycom
Software
-----Original Message----- From: Colin Fraser
[mailto:[EMAIL PROTECTED]] Sent: 20 April 2001
09:14 To: Multiple recipients of list delphi Subject: RE:
[DUG]: Sharing a database connection
I have not
looked into it at all...
But with
IBO you pass the database handle to the dll... Now, I have not done this, nor
do I know if it works with the BDE but it maybe something you could look at...
or... you could wait for someone that knows what they are talking about!
:-)
Regards
Colin
Is there a way to get an executable & 2
dll's to all use the same database connection. I have tried passing the
TDatabase component to the dll, and although it is apparently still active,
when a query opens it still brings up the database login
prompt
(any examples would be most
appreciated)
TIA
Sammy !!
Attention: The information in
this email and in any attachments is confidential. If you are not the intended
recipient then please do not distribute, copy or use this information. Please
notify us immediately by return email and then delete the message from your
computer. Any views or opinions presented are solely those of the author.
|