티스토리 뷰

Data.DB.TDataSet.SetFields

Delphi

procedure SetFields(const Values: array of const);

C++

void __fastcall SetFields(System::TVarRec const *Values, const int Values_Size);

Properties

TypeVisibilitySourceUnitParent
procedure
function
public
Data.DB.pas
Data.DB.hpp
Data.DBTDataSet

Description

Sets the values / for all fields / in a record.

Call SetFields / to set values for some or all fields / in the active record / at the same time.

Values contains the values / to insert into each field. 

Values / are assigned to the record / based on the order of columns / in the table / or tables underlying the dataset. 

These values / can be literals, variables, NULL, or nil (Delphi). 

If Values / contains fewer values than / there are fields in the record, / all records / for which values are not provided / are assigned a NULL value. 

A NULL value / overwrites any existing value / in such fields.

In C++, / Values_Size / is the index of the last value / in the Values array (one less than the total number of values).

Before calling SetFields, / call Edit / to put the dataset / into dsEdit state. 

After calling SetFields, / call Post / to write the changes / to the database or change log.

Note: To set values for some fields / while retaining existing values for others, / pass nil (Delphi) or NULL (C++) (explicitly casting it to void * in C++) for each field that should not change.


레코드의 모든 필드 값을 설정합니다.

동시에 활성한 레코드의 일부 또는 모든 필드 값을 설정하도록 SetFields를 호출합니다.

값에는 각 필드에 삽입할 값이 들어 있습니다.

값은 데이터 세트의 기본 테이블 또는 테이블의 열 순서에 따라 레코드에 할당됩니다. 

이러한 값은 리터럴, 변수, NULL 또는 nil (Delphi) 일 수 있습니다.

값이 레코드의 필드보다 적은 값을 포함하면, 값이 제공되지 않은 모든 레코드에 NULL 값이 할당됩니다.

NULL 값은 이러한 필드의 기존 값을 덮어 씁니다.

C ++에서 Values_Size는 Values ​​배열의 마지막 값에 대한 인덱스입니다 (값의 개수보다 하나 작음).

SetFields를 호출하기 전에 Edit를 호출하여 데이터 세트를 dsEdit 상태로 만듭니다.

SetFields를 호출 한 후 Post에 호출하여 데이터베이스 또는 변경 로그에 변경 사항을 기록합니다.

Note: 다른 필드의 기존 값을 유지하면서 일부 필드의 값을 설정하려면, 변경할 필요가 없는 각 필드에 대해 nil (Delphi) 또는 NULL (C ++) (C ++의 void *에 명시 적으로 캐스팅)을 전달합니다.


each 미국·영국 [i:tʃ]

각각(의)

insert into

…에 삽입하다.

underlying 미국식 [|ʌndər|laɪɪŋ]

1. (겉으로 잘 드러나지는 않지만) 근본적인 2. (다른 것의) 밑에 있는

fewer 미국·영국 [fjú:ər]

1. 보다 소수의   2. 보다 소수의 사람들

provided 미국·영국 [prə|vaɪdɪd]

1. (만약) …라면 2. 제공[공급]하다, 주다

existing 미국·영국 [ɪg|zɪstɪŋ]

기존의, 현재 사용되는

retaining 미국·영국 [rɪ|teɪnɪŋ]

1. (어떤 것을 제자리에) 고정시키는 2. (계속) 유지[보유]하다

explicitly

명쾌하게

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

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

[Reference] TDataSet.State  (0) 2016.12.17
[Reference] TADOQuery.Prepared  (0) 2016.12.16
[Reference] TDataSet.InsertRecord  (0) 2016.12.13
[Reference] TDataSet.Active  (0) 2016.12.12
[Reference] TDataSet.Refresh  (0) 2016.12.11
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
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
글 보관함