Q&A

  • show event
메뉴아이템에서 로그인을 클릭하면 사용자 등록 폼이 뜨는데 그때 formshow 이벤트를 실행시켜서 콤보박스 items에 DB에 있는 내용을 넣을려고 하는데



procedure TFRMUSER.FormShow(Sender: TObject);

begin

with qnext do begin

close;

sql.Add('select * from insacode where maincd=''dt''');

open;

//cb3.Items.clear;

while not EOF do begin

cb3.Items.add(fieldbyname('val').asstring);

qnext.next;

end;

end;

end;







식으로 했거든요 그런데 계속

project insa.exe raised exception class EReadError with message

'invalid property value'.

process stopped.use step or Run to continue.

라는 메세지가 나타나는데 어떻게 하면 되나요.

그런데 Formshow 이벤트만 지우면 실행이 되거든요 .좀 갈쳐 주세요 ~~~~^.^

1  COMMENTS
  • Profile
    내가 누굴깡..ㅋㅋㅋ 2001.07.30 23:42
    제가 생각하기엔..

    폼이 아직 생성되기 이전에 이벤트를 실행시켜 처리할수 없는 메세지 인것 같습니다.



    이렇게 한번 해 보심이..



    procedure comboinput;

    begin

    with qnext do begin

    close;

    sql.Add('select * from insacode where maincd=''dt''');

    open;

    //cb3.Items.clear;

    while not EOF do begin

    cb3.Items.add(fieldbyname('val').asstring);

    qnext.next;

    end;

    end;

    end;



    procedure TFRMUSER.n1click(Sender: TObject);

    begin

    frmuser.show;

    comboinput;

    end;



    초초초초 보보보보보~~~~~~~~~~ wrote:

    > 메뉴아이템에서 로그인을 클릭하면 사용자 등록 폼이 뜨는데 그때 formshow 이벤트를 실행시켜서 콤보박스 items에 DB에 있는 내용을 넣을려고 하는데

    >

    > procedure TFRMUSER.FormShow(Sender: TObject);

    > begin

    > with qnext do begin

    > close;

    > sql.Add('select * from insacode where maincd=''dt''');

    > open;

    > //cb3.Items.clear;

    > while not EOF do begin

    > cb3.Items.add(fieldbyname('val').asstring);

    > qnext.next;

    > end;

    > end;

    > end;

    >

    >

    >

    > 식으로 했거든요 그런데 계속

    > project insa.exe raised exception class EReadError with message

    > 'invalid property value'.

    > process stopped.use step or Run to continue.

    > 라는 메세지가 나타나는데 어떻게 하면 되나요.

    > 그런데 Formshow 이벤트만 지우면 실행이 되거든요 .좀 갈쳐 주세요 ~~~~^.^