C++Builder Programming Forum
C++Builder  |  Delphi  |  FireMonkey  |  C/C++  |  Free Pascal  |  Firebird
볼랜드포럼 BorlandForum
 경고! 게시물 작성자의 사전 허락없는 메일주소 추출행위 절대 금지
C++빌더 포럼
Q & A
FAQ
팁&트릭
강좌/문서
자료실
컴포넌트/라이브러리
메신저 프로젝트
볼랜드포럼 홈
헤드라인 뉴스
IT 뉴스
공지사항
자유게시판
해피 브레이크
공동 프로젝트
구인/구직
회원 장터
건의사항
운영진 게시판
회원 메뉴
북마크
볼랜드포럼 광고 모집

C++빌더 Q&A
C++Builder Programming Q&A
[29460] Re:예제를 따라하는데....선언을 어떻게 해야하는지.....ㅜ.ㅜ
smleelms [smleelms] 994 읽음    2004-04-22 15:33
IDE에서 DsEdit에 커서를 두고 F1 키를 눌러서 도움말을 불러보니, 다음과 같이 나오네요..

Indicates the current operating mode of a dataset component.

Unit

DB

enum TDataSetState { dsInactive, dsBrowse, dsEdit, dsInsert, dsSetKey, dsCalcFields, dsFilter, dsNewValue, dsOldValue, dsCurValue, dsBlockRead, dsInternalCalc, dsOpening };

Description

TDataSetState represents the values that may be in the State property of a dataset component. TDataSetState indicates the current operating mode of that dataset component. The following table lists all possible values in the TDataSetState type and describes what they indicate in the State property:

Value    Meaning

dsInactive    Dataset is closed, so its data is unavailable.
dsBrowse    Data can be viewed, but not changed. This is the default state of an open dataset.
dsEdit    Active record can be modified.
dsInsert    The active record is a newly inserted buffer that has not been posted. This record can be modified and then either posted or discarded.
dsSetKey    TTable and TClientDataSet only. Record searching is enabled, or a SetRange operation is under way. A restricted set of data can be viewed, and no data can be edited or inserted.
dsCalcFields    An OnCalcFields event is in progress. Noncalculated fields cannot be edited, and new records cannot be inserted.
dsFilter    An OnFilterRecord event is in progress. A restricted set of data can be viewed. No data can edited or inserted.
dsNewValue    Temporary state used internally when a field component뭩 NewValue property is accessed.
dsOldValue    Temporary state used internally when a field component뭩 OldValue property is accessed.
dsCurValue    Temporary state used internally when a field component뭩 CurValue property is accessed.
dsBlockRead    Data-aware controls are not updated and events are not triggered when moving to the next record.
dsInternalCalc    Temporary state used internally when values need to be calculated for a field that has a FieldKind of fkInternalCalc.
dsOpening    DataSet is in the process of opening but has not finished. This state occurs when the dataset is opened for asynchronous fetching.


즉 DB.hpp 를 인클루드 하시면 될거구요..

Post()는 DB에 있는 데이터를 ClientDataSet으로 불러온뒤에, Edit나 Update가 되었으므로,
ClientDataSet의 변경된 내용을 DB에 적용시키는 함수입니다.

seiyes 님이 쓰신 글 :
: 일단...
: c++ builder에 대한 책을 사려고
: 어제 영풍,교보를 다 가봤지만.....ㅜ.ㅜ
: c++ builder3밖엔 없더군요.....
: 그래서....볼랜드에서 나온 예제를 c++ builder6에서 따라하고 있는 도중에
: 컴파일 오류가 나서 ..질문드립니다..
:
: 첫번째 질문..
: /////////////////////////
:
:     if ( ClientDataSet1->State == DsEdit || ClientDataSet1->State == DsUpdate )
:     {
:         ClientDataSet1->Post());
:     }
:     ClientDataSet1->ApplyUpdates(-1);
:
: ////////////////////////
:
: 이 코드를 보면 dataSet이 edit되거나 update된 상태를 감지하여
: post()를 하고 최종적으로 DB에 applyUpdate를 하는소스인데요..
:
: ClientDataSet1->State 의 타입은 TDataSetState인데...
: DsEdit 이나 DsUpdate에 어떤 값이 들어가는건가요?
: (Undefined Symbol error가 나는거 봐서는 선언을 해줘야 할꺼 같은데...음...)
: 예제에서는..선언해주는곳도 없고...ㅡ.ㅡ;;
: 선언해준다면 무슨 값이 들어가는지도...궁금합니다..
: 도움말을 봐도 내용이 없네요..ㅜㅜ
: 그리고 Edit, Insert, update, delete에 대한 값이 따로 있는지도 궁금합니다..
:
: 두번재는 post() 메서드의 역할이 궁금합니다....
:

+ -

관련 글 리스트
29458 예제를 따라하는데....선언을 어떻게 해야하는지.....ㅜ.ㅜ seiyes 730 2004/04/22
34902     Re:예제를 따라하는데....선언을 어떻게 해야하는지.....ㅜ.ㅜ 김상윤 784 2004/04/23
34901     Re:예제를 따라하는데....선언을 어떻게 해야하는지.....ㅜ.ㅜ 황경록 802 2004/04/23
29461     [만해]허접 답변입니다. 강재호.만해 901 2004/04/22
29460     Re:예제를 따라하는데....선언을 어떻게 해야하는지.....ㅜ.ㅜ smleelms 994 2004/04/22
Google
Copyright © 1999-2015, borlandforum.com. All right reserved.