In the different versions of TUniQuery use 'Assign'

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
cxg417
Posts: 41
Joined: Thu 26 Mar 2009 08:07

In the different versions of TUniQuery use 'Assign'

Post by cxg417 » Mon 07 Dec 2009 08:28

exe + dll: In the different versions of TUniQuery use 'Assign', there will be problems?
________
FORD EX HISTORY
Last edited by cxg417 on Tue 15 Feb 2011 14:59, edited 1 time in total.

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Mon 07 Dec 2009 08:59

You cannot use the Assign method of TUniQuery if you pass a TUniQuery object from another module to this method.

cxg417
Posts: 41
Joined: Thu 26 Mar 2009 08:07

Post by cxg417 » Tue 08 Dec 2009 01:08

In ccc.dll: (unidac3.0.0.3)

function GetUniQ: TUniQuery; stdcall;

function GetUniQ: TUniQuery;
begin
UniQuery1.Close;
UniQuery1.SQL.Text:= 'select * from table1';
UniQuery1.Open;
Result:= UniQuery1;
end;

In exe: (unidac4.0.0.1 in the Future)

TGetUniQ=function TUniQuery;stdcall;

function GetUniQuery: TUniQuery;
var HDll: THandle;
PDll: TFarProc;
begin
HDll:= LoadLibrary(pChar('d:\ccc.dll'));
PDll:=GetProcAddress(HDll, 'GetUniQ');
Result:= TGetUniQ(PDll);
end;

procedure TForm1.BitBtn1Click(Sender: TObject);
begin
VirtualTable1.Assign(GetUniQuery);
end;

UniDAC in different versions, 'VirtualTable1.Assign (GetUniQuery);', there is the problem?
________
SUZUKI KATANA SPECIFICATIONS
Last edited by cxg417 on Tue 15 Feb 2011 15:00, edited 1 time in total.

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Tue 08 Dec 2009 08:57

You cannot use the Assign method of TVirtualTable in such way.

cxg417
Posts: 41
Joined: Thu 26 Mar 2009 08:07

Post by cxg417 » Wed 09 Dec 2009 08:51

Why can not I use? Can you tell me the reason? Because I have now used this way.
________
Dodge tomahawk specifications
Last edited by cxg417 on Tue 15 Feb 2011 15:00, edited 1 time in total.

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Thu 10 Dec 2009 09:16

You cannot pass objects to/from DLL. You can pass only simple types like Integer or String. The only exception is the AssingConnect method of TUniConnection.

Post Reply