티스토리 뷰

Data.DB.TDataSet.Active

Delphi

property Active: Boolean read GetActive write SetActive default False;

C++

__property bool Active = {read=GetActive, write=SetActive, default=0};

Properties

TypeVisibilitySourceUnitParent
propertypublic
Data.DB.pas
Data.DB.hpp
Data.DBTDataSet

Description

Specifies / whether or not a dataset is open.

Use Active / to determine or set whether a dataset / is populated with data. 

When Active is false, / the dataset is closed; / the dataset / cannot read or write data / and data-aware controls / can not use it / to fetch data or post edits. 

When Active is true, / the dataset can be populated with data. 

It can read data / from a database or other source (such as a provider). 

Depending on the CanModify property, / active datasets can post changes.

Setting Active to true:

  1. Generates a BeforeOpen event.
  2. Sets the dataset state to dsBrowse.
  3. Establishes a way to fetch data (typically by opening a cursor).
  4. Generates an AfterOpen event.

데이터 세트가 열려 있는지 여부를 나타냅니다.

Active 를 사용하여 데이터 세트에 데이터가 채워지는지 여부를 결정하거나 설정합니다.

Active 가 false라면 데이터 세트는 닫히며, 데이터 세트는 데이터를 읽거나 쓸 수 없으며, 데이터 인식 컨트롤은 데이터를 가져 오거나 편집 내용을 게시하는데 사용할 수 없습니다.

Active 가 true이면 데이터 세트에 데이터가 채워집니다. 

데이터베이스 또는 다른 소스 (예 : 제공자)에서 데이터를 읽을 수 있습니다.

CanModify 속성에 따라 활성한 데이터 세트가 변경 내용을 게시 할 수 있습니다.

Active 를 true로 설정:

  1. BeforeOpen 이벤트를 생성합니다.
  2. 데이터 세트의 상태를 dsBrowse로 설정합니다.
  3. 데이터를 가져 오는 방법을 설정합니다 (일반적으로 커서를 열어서).
  4. AfterOpen 이벤트를 생성합니다.


If an error occurs / while opening the dataset, / dataset state / is set to dsInactive, / and any cursor is closed.

Setting Active to false:

  1. Triggers a BeforeClose event.
  2. Sets the State property to dsInactive.
  3. Closes the cursor.
  4. Triggers an AfterClose event.

An application / must set Active to false / before changing / other properties that affect the status of a database / or the controls that display data / in an application.

Note: Calling the Open method / sets Active to true; / calling the Close method / sets Active to false.

데이터 세트를 여는 동안 오류가 발생하면, 데이터 세트 상태가 dsInactive로 설정되고 커서가 닫힙니다.

Active 속성을 false로 설정:

  1. BeforeClose 이벤트를 발생시킵니다.
  2. State 속성을 dsInactive로 설정합니다.
  3. 커서를 닫습니다.
  4. AfterClose 이벤트를 발생시킵니다.

응용 프로그램은 데이터베이스의 상태에 영향을 미치는 다른 속성과 응용 프로그램에서 데이터를 표시하는 컨트롤을 변경하기 전에 Active 를 false로 설정해야합니다.

참고 :   Open 메서드를 호출하면 Active가 true로 설정됩니다. Close 메서드를 호출하면 Active가 false로 설정됩니다.


specify(specifies) 미국·영국 [|spesɪfaɪ]

(구체적으로) 명시하다

whether 미국·영국 [|weðə(r)]

1. …인지 (아닌지・(아니면) ~인지)   2. …이든 (아니든・(아니면) ~이든)

whether or not

~인지 아닌지

determine 미국식 [dɪ|t3:rmɪn]

1. 알아내다, 밝히다   2. (무엇의 방식・유형을) 결정하다   3. (공식적으로) 확정하다

populate 미국식 [|pɑ:pjuleɪt]

1. (어떤 지역의 주민으로) 살다, 거주하다   2. (어떤 지역으로 사람・동물들을) 이주시키다

depending on 

…에 따라

occur(occurs) 미국·영국 |k3:(r)]

1. 일어나다, 발생하다   2. (어디에) 존재하다

affect 미국·영국 |fekt]

1. 영향을 미치다   2. (사람이나 신체 부위에) 발생하다; 병이 나게 하다

출처: http://docwiki.embarcadero.com/Libraries/XE2/en/Data.DB.TDataSet.Active


'프로그래밍 언어 > Delphi' 카테고리의 다른 글

[Reference] TDataSet.SetFields  (0) 2016.12.14
[Reference] TDataSet.InsertRecord  (0) 2016.12.13
[Reference] TDataSet.Refresh  (0) 2016.12.11
[Reference] TDataSet.Delete  (0) 2016.12.10
[Reference] TDataSet.Append  (0) 2016.12.09
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2024/05   »
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
글 보관함