Loading data through DLLs

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
PreverInfo
Posts: 4
Joined: Mon 07 Apr 2008 12:59

Loading data through DLLs

Post by PreverInfo » Tue 06 May 2008 12:46

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.

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Wed 07 May 2008 06:30

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.

PreverInfo
Posts: 4
Joined: Mon 07 Apr 2008 12:59

Thanks.

Post by PreverInfo » Wed 07 May 2008 17:41

Oh, yeah.

I will see it. Thank you Antaeus.

Post Reply