Hello Sergey Seroukhov and all,
  Thank you for your Script samples, i made my idea clear....
  I do have another question.....
  As mention before, How can i return a result data set to my main form....
  As the Return value of a function need a ordinary type... how can i do
so....??




> Hello, Raymond!
>
>
> You can't change the process of compilation. If you do not turn on
> "Build with runtime packages" delphi will link ZLibMySql.dcu to both
> xxxxx.exe and vvvvv.dll. Forget about it. We a talking how to use zdbo
> with static linking (without bpl).
>
>
> ======================= Start Cut =========================
> unit main;
>
> uses ... ZLibMySql...;
>
> type
>   TForm1 = class (TForm)
>     ....
>     ZMySqlDatabase1: TZMySqlDatabase;
>     ZMySqlTransact1: TZMySqlTransact;
>     ...
>   end;
>
> ...
>
> procedure PassConnect(DllHandle: Integer; Database: TZMySqlDatabase;
>   Transact: TZMySqlTransact); library 'library.dll';
> procedure OpenForm; library 'library.dll';
> procedure CloseForm; library 'library.dll';
>
> procedure TForm1.Form1OnCreate(Sender: TObject);
> begin
>   if not MySqlLoadLib then
>     raise Exception.Create('Error loading libmysql.dll');
>   PassConnect(ZLibMySql.hDll, ZMySqlDatabase1, ZMySqlTransact1);
> end;
>
> procedure TForm1.Button1OnClick(Sender: TObject);
> begin
>   OpenForm;
> end;
>
> ...
> end.
>
>
> library library;
>
> interface
>
> ...
>
> procedure PassConnect(DllHandle: Integer; Database: TZMySqlDatabase;
>   Transact: TZMySqlTransact);
> procedure OpenForm;
> procedure CloseForm;
>
> ...
>
> implementation
>
> procedure PassConnect(DllHandle: Integer; Database: TZMySqlDatabase;
>   Transact: TZMySqlTransact);
> begin
>   ZLibMySql.hDll := DllHandle;
>   if not MySqlLoadLib then
>     raise Exception('Error loading libmysql.dll');
>   ZMySqlQuery1.Database := Database;
>   ZMySqlQuery1.Transact := Transact;
> end;
>
> procedure OpenForm;
> begin
>   ZMySqlQuery1.Open;
>   Form2.Show;
> end;
>
> procedure CloseForm;
> begin
>   Form2.Hide;
>   ZMySqlQuery1.Close;
> end;
>
> ...
> end;
> ============================= End Cut =========================
>
> I did not compile this code, but I think the main idea should be clear
now.
>
>
> To unsubscribe mail to
> [EMAIL PROTECTED] with 'unsubscribe' as the subject
> home page: http://www.zeos.dn.ua

To unsubscribe mail to 
[EMAIL PROTECTED] with 'unsubscribe' as the subject
home page: http://www.zeos.dn.ua

Reply via email to