Additional
dbCAP
AnyDAC
ThinDAC
NCOCI8
Topic: Installing AnyDac with Delphi6 Error
Installing AnyDac with Delphi6 Error
Posted: 2005/05/20 12:59
 
I got errors with AnyDAC installer, so
i tried to install the Package with Delphi 6
by hand.

I did this the folloeing way
daADD6.bpg > view Project Manager >
Double click daADDclD6.bpl >
click compile button > click install button


I had 3 Problems
1.
unit daADStanParam;
function FindVarData was not found

2.
unit daADGUIxFormsControls;
const
clHotLight was not known

3.
unit daADDatSManager;
and
unit ADQAPhysLayerCNN.pas;
EVariantTypeCastError was not known



I tried to fix it by myself and could sucessfully install the Package, but it
seems that i have done it wrong because the Demos dont work very well.

I have done the following

1.
found function FindVarData in a JVCL Unit
and copied it to the unit daADDatSManager see below. I dont know if that is the Function wich was missed in daADStanParam. But this way i could compile.

unit daADStanParam;
..
...

implementation

uses
{$IFDEF AnyDAC_D9}
Windows,
{$ENDIF}
SysUtils, DBConsts, VarUtils,
daADStanError, daADStanConst;
{$IFNDEF COMPILER6_UP}


// these types and functions were introduced in D6
type
TVariantRelationship = (vrEqual, vrLessThan, vrGreaterThan, vrNotEqual);

function FindVarData(const V: Variant): PVarData;
begin
Result := @TVarData(V);
while Result.VType = varByRef or varVariant do
Result := PVarData(Result.VPointer);
end;

function VarCompareValue(const A, B: Variant): TVariantRelationship;
const
CTruth: array [Boolean] of TVariantRelationship = (vrNotEqual, vrEqual);
var
LA, LB: TVarData;
begin
LA := FindVarData(A)^;
LB := FindVarData(^;
if LA.VType = varEmpty then
Result := CTruth[LB.VType = varEmpty]
else
if LA.VType = varNull then
Result := CTruth[LB.VType = varNull]
else
if LB.VType in [varEmpty, varNull] then
Result := vrNotEqual
else
if A = B then
Result := vrEqual
else
if A < B then
Result := vrLessThan
else
Result := vrGreaterThan;
end;

{$ENDIF COMPILER6_UP}








2.
Put the following Constant to
unit daADGUIxFormsControls;

const
clHotLight = TColor(COLOR_HOTLIGHT or $80000000);


3.
Replaced EVariantTypeCastError
with EVariantError

unit daADDatSManager;
replaced two times

unit ADQAPhysLayerCNN.pas;
replaced one time

I dont know if this was OK ?
In wich unit is EVariantTypeCastError defined?
RE: Installing AnyDac with Delphi6 Error
Posted: 2005/05/20 19:00
 
Hello !

quote:i tried to install the Package with Delphi 6
Do you mean, that you are using Delphi 5 ?
I just checked with Delphi 6 - all is ok.

Regards,
Dmitry
RE: Installing AnyDac with Delphi6 Error
Posted: 2005/05/21 21:36
 
OK thanks for testing with DE6.
I will check my Delphi installation.
Maybe it's because i have both Versions
Delphi 5 and Delphi 6 installed on the PC.
Or there is something wrong with my DE6 installation.
RE: Installing AnyDac with Delphi6 Error
Posted: 2005/05/22 09:53
 
Also, i have Delphi 6 + Update Pack 2. May be that makes difference ? If you have Delphi 6 VCL sources, could you check your Graphics.pas for clHotLight constant ?

Regards,
Dmitry
RE: Installing AnyDac with Delphi6 Error
Posted: 2005/05/22 14:28
 
I have already deleted DE6 and then installed AnyDac by hand with De 2005 Architect Trial Version.
I could install it in DE 2005 without errors.
But i also had Problems with the Examples
invalid Pointer ..
Actually both Versions were Trials, maybe thats the Problem? I also used an unpatched Oracle 9i Rel 2 (9.2.0.1.0) Database?

I will do a new installtion and then inform you about Graphics.pas - clHotLight.
RE: Installing AnyDac with Delphi6 Error
Posted: 2005/05/22 14:33
 
> But i also had Problems with the Examples
> invalid Pointer ..

At what demo you got "invalid pointer" error ?

> Actually both Versions were Trials,
> maybe thats the Problem?

That is the difference. I am using Delphi's with latest update packs.

> I also used an unpatched Oracle 9i Rel 2
>(9.2.0.1.0) Database?

No, that does not make scense.

> I will do a new installtion and then
> inform you about Graphics.pas - clHotLight.

Thank you !

Regards,
Dmitry
RE: Installing AnyDac with Delphi6 Error
Posted: 2005/05/23 18:37
 
Thanks for your Help!

I'will look for a upgrade off my Delphi 5 (if i can afford it) and then try again.