.


:




:

































 

 

 

 


TTable




TTable, . :

  • Active - , (true) (false) .
  • DatabaseName - , , (alias) ( BDE, , Borland, SQL Explorer, Database/Explore). , ( Active false), :

Table1->Active = false;
Table1->DatabaseName = "BCDEMOS"
Table1->Active = true;

  • TableName - .
  • Exclusive - true, , . false ( ), .
  • IndexName - . , .
  • MasterFields - .
  • MasterSource - TDataSource, TTable .
  • ReadOnly - true, " ". ReadOnly, .
  • Eof, Bof - true, .
  • Fields - TField. , , , :

Edit1->Text=Table1->Fields[2]->AsString;

TTable :

  • Open Close Active True False .
  • Refresh .
  • First, Last, Next, Prior , , , :

Table1->First();
while (!Table1->Eof)
{
//- ...
Table1->Next();
};

  • MoveBy ( )
  • Insert, Edit, Delete, Append - , , , .
  • Post - . :

Table2->Insert();
Table2->Fields[0]->AsInteger = 100;
Table2->Fields[1]->AsString =Edit1->Text;
Table2->Post();

  • Cancel - , .
  • FieldByName - :

S=Table1->FieldByName("area")->AsString;

  • SetKey .
  • GotoKey , Fields[n] , n - , 0:

Table1->SetKey();
Table1->Fields[0]->AsString=Edit1->Text;
Table1->GotoKey();

  • SetRangeStart, SetRangeEnd, ApplyRange - .

Table1->SetRangeStart();
Table1->Fields[0]->AsString = Edit1->Text;
Table1->SetRangeEnd();
Table1->Fields[0]->AsString = Edit2->Text;
Table1->ApplyRange();

  • FreeBookmark, GetBookmark, GotoBookmark- . Bookmark TBookmark. GetBookmark c . GotoBookmark , . FreeBookmark TBookmark:

TBookmark Marker =Table1->GetBookmark();
Table1->GotoBookmark(Marker);
Table1->FreeBookmark(Marker);

C TTable . , BeforePost , AfterPost - , AfterDelete - ..

TTable , :

1. Data Access , TTable .

2. DatabaseName , , .

3. TableName .

4. DataSource DataSet TTable.

5. Data Controls DataSource , .





:


: 2015-10-01; !; : 474 |


:

:

, , .
==> ...

1729 - | 1393 -


© 2015-2024 lektsii.org - -

: 0.008 .