Page 1 of 1

Loading data through DLLs

Posted: Tue 06 May 2008 12:46
by PreverInfo
Dear Administrators

I am developing a project (in Delphi) wish should have 1 form. The main form, just call a DLL. In DLL, I need to create 1 connection and 1 msquery; it is easy, but I have a question:
- How do I create a link in main form (DBGrid - for example) to a connection in DLL?
Look:
---> MainForm --> DBGrid --> DataSource --> ??? (DLL)

Help me, please.

Observation: I use a SDac 4.35 (registered component) with Delphi 6.

Thanks.

Posted: Wed 07 May 2008 06:30
by Antaeus
You should pass the TMSQuery object from DLL and link it to DataSource at run-time. For example you can see the DLL demo of SDAC. In this demo a TMSConnection object is passed from the main application to DLL.

Thanks.

Posted: Wed 07 May 2008 17:41
by PreverInfo
Oh, yeah.

I will see it. Thank you Antaeus.