Einzelnen Beitrag anzeigen

question

Registriert seit: 17. Apr 2013
97 Beiträge
 
#14

AW: Access variable from one form to another

  Alt 26. Aug 2013, 22:19
Hi, now its working fine i have written the follwoing
Code:
procedure TForm1.SetMyPersonID(AValue: Integer);
begin
  FQuery.FieldByName('MyPersonID').AsInteger := AValue;
end;

procedure TForm1.GetMyPersonID: Integer;
begin
  Result := FQuery.FieldByName('MyPersonID').AsInteger;
end;
is that ok to write like this, i mean normally in sql query need to query.sql.add/query.sql.open/close... but in this case it is working fine should i need to write the whole query or is that also okay just to write only
Code:
Result := FQuery.FieldByName('MyPersonID').AsInteger;
  Mit Zitat antworten Zitat