05. februar 2008 - 10:36Der er
7 kommentarer og 1 løsning
Kontakt til professionel delphi programmør
Hej!
Jeg har nogle problemer med en ADO databse i delphi. Jeg brug for noget hjælp til at få løst problemet og det er beskrevet i spørgsmålet "Fejl med ADO database" lige herunder.
Er der en der vil byde ind som problemknuser? Problemet er opstået i forbindelse med noget arbejde på en virksomhed så evt. betaling for support er ikke noget problem!!
Jeg kunne forstille mig at brugerne "hrc", "martinlind", og "borrisholt" nemt kunne løse det...
I lang tid har samarbejdsbranchen fokuseret på at forbedre enhedsfunktioner – bedre kameraer, klarere lyd og smartere software. Men den virkelige forvandling handler ikke om funktioner.
procedure TBorrisholtQuery.CreateSQL; begin //do nothing in base class end;
destructor TBorrisholtQuery.Destroy; begin inherited; FreeAndNil(FFieldsNames); end;
function TBorrisholtQuery.GetBooleanProperty(Index: Integer): Boolean; begin Result := False; if Active then Result := FieldByName(FFieldsNames[Index]).AsBoolean; end;
function TBorrisholtQuery.GetColorProperty(Index: Integer): TColor; begin Result := clNone; if Active then Result := FieldByName(FFieldsNames[Index]).AsInteger; end;
function TBorrisholtQuery.GetDateTimeProperty(Index: Integer): TDateTime; begin Result := 0; if Active then Result := FieldByName(FFieldsNames[Index]).AsDateTime; end;
function TBorrisholtQuery.GetFloatProperty(Index: Integer): Double; begin Result := 0; if Active then Result := FieldByName(FFieldsNames[Index]).AsFloat; end;
function TBorrisholtQuery.GetIntegerProperty(Index: Integer): Integer; begin Result := 0; if Active then Result := FieldByName(FFieldsNames[Index]).AsInteger; end;
function TBorrisholtQuery.GetStringProperty(Index: Integer): string; begin Result := ''; if Active then Result := FieldByName(FFieldsNames[Index]).AsString; end;
function TBorrisholtQuery.GetTimeProperty(Index: Integer): TTime; begin Result := 0; if Active then Result := Frac(FieldByName(FFieldsNames[Index]).AsDateTime); end;
procedure TBorrisholtQuery.SetActive(Value: Boolean); begin if Value and Active then Active := False; if Value then CreateSQL; inherited; end;
procedure TBorrisholtQuery.SetBooleanProperty(const Index: Integer; const Value: Boolean); begin if Active and (State in [dsEdit, dsInsert]) then FieldByName(FFieldsNames[Index]).AsBoolean := Value; end;
procedure TBorrisholtQuery.SetColorProperty(const Index: Integer; const Value: TColor); begin if Active and (State in [dsEdit, dsInsert]) then FieldByName(FFieldsNames[Index]).AsInteger := Value; end;
procedure TBorrisholtQuery.SetDateTimeProperty(const Index: Integer; const Value: TDateTime); begin if Active and (State in [dsEdit, dsInsert]) then FieldByName(FFieldsNames[Index]).AsDateTime := Value; end;
procedure TBorrisholtQuery.SetFloatProperty(const Index: Integer; const Value: Double); begin if Active and (State in [dsEdit, dsInsert]) then FieldByName(FFieldsNames[Index]).AsFloat := Value; end;
procedure TBorrisholtQuery.SetIntegerProperty(const Index, Value: Integer); begin if Active and (State in [dsEdit, dsInsert]) then FieldByName(FFieldsNames[Index]).AsInteger := Value; end;
procedure TBorrisholtQuery.SetStringProperty(const Index: Integer; const Value: string); begin if Active and (State in [dsEdit, dsInsert]) then FieldByName(FFieldsNames[Index]).AsString := Value; end;
procedure TBorrisholtQuery.SetTimeProperty(const Index: Integer; const Value: TTime); begin if Active and (State in [dsEdit, dsInsert]) then FieldByName(FFieldsNames[Index]).AsDateTime := Value; end;
{ TDatabaseConnection }
constructor TDatabaseConnection.Create(AOwner: TComponent); begin inherited; FileName := GetDatabaseName; end;
function TDatabaseConnection.DataBasePath: string; begin Result := ExtractFilePath(ParamStr(0)); end;
function TDatabaseConnection.GetDatabaseName: string; var Path: string; begin Path := DataBasePath; ForceDirectories(Path); Result := Path + 'JPPlaner.mdb'; end;
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.