.


:




:

































 

 

 

 


If DataModule2.Nakls.Locate(NDate, DateTimePicker.Date, []) then

With Table1 do

Begin

First;

While not EOF do

Begin

{- }

Next;

end;

end;

repeatuntil :

With Table1 do

Begin

First;

Repeat

{- }

until not FindNext;

end;

 

 

Locate

Locate , , , . True. , False .

 

function Locate(const KeyFields: String; const KeyValues: Variant; Options: TLocaleOptions):Boolean

 

KeyFields , . . KeyValues , i-e KeyValues i- KeyFields. Options , .

IoCaseInsensitivite .

IoPartialKey , ; , "" "", "-", "" ..

Locate - . () - , Locate , .

 

:

  • TDateTimePicker
  • OnChange

 

if DataModule2.Nakls.Locate("NDate", DateTimePicker.Date, []) then

DBGrid1.SetFocus;

 

Nakls

 

Lookup

Lookup , , , . . Locate Lookup .

 

function (const KeyFields: String; const KeyValues: Variant; ResultFields: String): Variant

 

KeyFields , ( , ). KeyValues , KeyFields. ResultFields , . Variant .

, i- KeyFields i-e KeyValues. , KeyValues ; VarArrayOf.

Locate, - , . , Lookup Null.

, Lookup , ResultFields. ResultFields.

 

 

:

  • :
    • TSpinEdit seBookID
    • 2 TLabel - lBookName lBookAuthor .
    • TButton Caption ""
  • OnClick :

 

Var

LookupResult:variant;

Begin

LookupResult:= DataModule2.Books.Lookup("BookID",seBookID.Value, "BName;BAuthor");

 

if VarType(LookupResult) = varNull then

ShowMessage(" " + IntToStr(seBookID.Value))

else if VarType(LookupResult) = varEmpty then

ShowMessage(" ")



<== | ==>
: , | - (). . .
:


: 2016-09-03; !; : 375 |


:

:

, .
==> ...

1519 - | 1344 -


© 2015-2024 lektsii.org - -

: 0.015 .