In the preparation of a DLL, and the DLL how to use ADOQuery component to access SQL databases???

Category: Delphi -> Database Author: suncycle Date: 2014-01-17 13:41:00
 
suncycle
2014-01-17 13:41:00
var
DM: TDataModule1;
begin
DM: = TDataModule1.Create (nil);
try
/ / Do your things
finally
Dm.Free
; end
end
i7i7i7
2014-01-17 13:44:26
Yes, the same general procedure for writing database is almost certain parameters can not be fixed merely just
hfenxishi
2014-01-17 13:48:57
Exe program as you write the same, with a Dm to install these components, and then access it.
eternal1211x
2014-01-17 13:55:50
to chechy: Please elaborate, I tried dm to deal with, but you can not quote dm in ADOQuery.
laodonggua2010
2014-01-17 14:08:54
to chechy & szkingrose: I beginner Delphi, can not give a simple example, for my reference,

Thank you!
wssz5h
2014-01-17 14:20:28
Why can not reference ah? DLL programming itself and the Exe programming no difference. If I have to say that the difference, then the DLL Form, DM instantiation should do it by yourself, but usually Exe is for you to do in Delphi.
abc857501940
2014-01-17 14:33:08
to chechy: I very dish :-), what should be instantiated in the DLL dm ah? ? I tried to compile without error,

when calling a DLL API does not return a result. (Dm seems to be referenced in the ADOQuery simply not established)
Q15194329191
2014-01-17 14:39:48
in a DLL using ADO components or other COM components prior to CoInitialize (nil);, complete CoUninitialize;