wolfi2
User
 Fresh Boarder
| Posts: 4 |   | Karma: 0 |
|
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?
|
|