|
방법1.
Query문을 좀 바꿔보세요
SELECT count(*) as m_Count FROM Patients.DB
위와같이 하면 FieldByName으로 "m_Count"를 가져올수 있습니다.
* 일반적인 방법
방법2.
아래와 같이 Index로 Filed 내용을 가져올수도 있습니다.
Query1->Fields->Fields[0]->AsInteger
사용하는 Component에 따라 방식이 좀 다르지만...
그럼
구윤태 님이 쓰신 글 :
: DM->QueryPatients->Close();
: DM->QueryPatients->SQL->Clear();
: DM->QueryPatients->SQL->Add("SELECT * FROM Patients.DB");
: DM->QueryPatients->Open();
:
: String Text;
: Text = DM->QueryPatients->FieldByName("PName")->AsString;
:
:
: 위에 처럼 컬럼 내임이 PName 인것은
: DM->QueryPatients->FieldByName("PName")->AsString;
: 가져오는데
:
: SELECT count(PName) FROM Patients.DB 이런 쿼리문이 있을 경우 , INT 값을 가져오고 싶을때
: int m_Count;
: m_Count = ? ; 어떻게 받아 오는지 모르겠습니다.
:
:
: query 를 통한 값 가져오는 방법좀 알려주세요
|