Bu yangi obyektlar CUSTOMER jadvalini tasvirlaydi.
QuerylCustNo: TFloatField;
QuerylCompany: TStringField;
QuerylAddrl:TStringField;
263
QuerylAddr2: TStringField;
QuerylCity: TStringField;
QuerylState: TStringField;
QuerylZip: TStringField;
QuerylCountry: TStringField;
QuerylPhone: TStringField;
QuerylFAX: TStringField;
QuerylTaxRate: TFloatField;
QuerylContact: TStringField;
Agar biz Queryl obyektini Customer deb o‘zgartirsak quyidagi
nomlar hosil boladi:
CustomerCustNo
CustomerCompany
Har bir yangi yaratilgan obyekt T t TField sinfining avlodi hisoblanadi.
Ajdodning turi ma’lumotlar turiga bog‘liq. Masalan, CustNo
maydonining turi TFloatField, QuerylCity tipi TStringField.
Bu sinflarning eng asosiy xossasi Value deb ataladi. Bu xossaga
quyidagicha murojaat qilish mumkin:
procedure TForml.ButtonlClick(Sender: TObject);
var
d: Double;
S: string;
begin
d := QuerylCustNo.Value;
S := QuerylCompany.Value;
d:=d+l;
S := 'Zoo';
QuerylCustNoValue := d;
QuerylCompanyValue := S;
end;
Value qiymatining turi har doim o‘zi tegishli bolgan may-don
turiga mos keladi. Masalan, TStringFields uchun — string,
TCurrencyFields uchun —double.
Agar joriy DataSet da maydonlar nomini olish lozim bo‘lsa.
FieldName xossasidan ikki usulda foydalanish lozim:
264
S := Queryl.Fields[0].Name;
S := QuerylCustNo.Name;
CUSTOMER jadvali uchun birinchi misol "CustNo" qatorini,