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
[14462] Re:E2034 Cannot convert 'int' to 'TRadioGroup' 메세지뭐죠?
만해 [greenuri] 893 읽음    2002-01-14 13:02
greatcbj 님이 쓰신 글 :
: void __fastcall TForm3::Music_SeachClick(TObject *Sender)
: {
:     if ((Edit_Music->Text == ""))
:     {
:         ShowMessage("검색어를 입력하세요.   ");
:         return;
:     }
:
:     if (Form3->rdoMusic_Index == 0)
:     {
:     Query3->SQL->Clear();
:     Query3->SQL->Add("select * from 잡지목록 where 순번=:Param1");
:     Query3->ParamByName("Param1")->AsString = Edit_Music->Text; // Name
:
:     Query3->Open();
:     }
:
:     else if (Form3->rdoMusic_Index == 1)
:     {
:     Query3->SQL->Clear();
:     Query3->SQL->Add("select * from 잡지목록 where 제목=:Param2");
:     Query3->ParamByName("Param2")->AsString = Edit_Music->Text; // Name
:
:     Query3->Open();
:     }
:
:     else if (Form3->rdoMusic_Index == 2)
:     {
:     Query3->SQL->Clear();
:     Query3->SQL->Add("select * from 잡지목록 where 출판사=:Param3");
:     Query3->ParamByName("Param3")->AsString = Edit_Music->Text; // Name
:
:     Query3->Open();
:     }
:
:     else if (Form3->rdoMusic_Index == 3)
:     {
:     Query3->SQL->Clear();
:     Query3->SQL->Add("select * from 잡지목록 where 출간일=:Param1");
:     Query3->ParamByName("Param1")->AsString = Edit_Music->Text; // Name
:
:     Query3->Open();
:     }
:
: 입니다. 여기서 else if 절 이후 Form3->rdoMusic_Index == 에서 에러가 딱걸리네요.
:
: 도와주세요...
:

안녕하세요 만해 입니다.

조금 간단한 질문이네요

rdoMusic_index 가 RadioGroup 컴포넌트가 맞다면요

rdoMusic_index->ItemIndex로 고쳐 보세요

그리고 ItemIndex는 -1값을 가진답니다. 참고 하세요

조금 쉽게 여러 루틴을 고쳐 보면요


   switch (Form3->rdoMusic_Index->ItemIndex)
   {
    case -1 : ShowMessage("여기에 -1일 경우 처리할 루틴을 입력하세요");break;

    case 0 :{
     Query3->SQL->Clear();
     Query3->SQL->Add("select * from 잡지목록 where 순번=:Param1");
     Query3->ParamByName("Param1")->AsString = Edit_Music->Text; // Name

     Query3->Open();break;
     }

    case 1:{
     Query3->SQL->Clear();
     Query3->SQL->Add("select * from 잡지목록 where 제목=:Param2");
     Query3->ParamByName("Param2")->AsString = Edit_Music->Text; // Name

     Query3->Open();break;
     }

    case 2:{
     Query3->SQL->Clear();
     Query3->SQL->Add("select * from 잡지목록 where 출판사=:Param3");
     Query3->ParamByName("Param3")->AsString = Edit_Music->Text; // Name

     Query3->Open();break;
     }

    case 3:{
     Query3->SQL->Clear();
     Query3->SQL->Add("select * from 잡지목록 where 출간일=:Param1");
     Query3->ParamByName("Param1")->AsString = Edit_Music->Text; // Name

     Query3->Open();break;
     }
   }

이런식으로 해도 괘안을지 않을까요?


+ -

관련 글 리스트
14455 E2034 Cannot convert 'int' to 'TRadioGroup' 메세지뭐죠? greatcbj 846 2002/01/14
14462     Re:E2034 Cannot convert 'int' to 'TRadioGroup' 메세지뭐죠? 만해 893 2002/01/14
14463         Re:Re:E2034 Cannot convert 'int' to 'TRadioGroup' 메세지뭐죠? G.B.J 799 2002/01/14
14471             Re:Re:Re:E2034 Cannot convert 'int' to 'TRadioGroup' 메세지뭐죠? 만해 909 2002/01/14
14488                 Re:Re:Re:Re:E2034 Cannot convert 'int' to 'TRadioGroup' 메세지뭐죠? G.B.J 848 2002/01/14
Google
Copyright © 1999-2015, borlandforum.com. All right reserved.