//입력문임당..
procedure Thakjf.Button1Click(Sender: TObject);
begin
saveq1.close;
saveq1.sql.clear;
saveq1.sql.add(' insert into mit ');
saveq1.sql.add(' ( hakbun, kname, hname, ename, grade, juya, hakgwa, sex, ) ');
saveq1.sql.add(' ( bjpost, bjjuso1, bjjuso2, hspost, hsjuso1, hsjuso2, ');
saveq1.sql.add(' ( gspost, gsjuso1, gsjuso2, hstelno, taste, special, email, ) ');
saveq1.sql.add(' ( hsbbno, chulname, chuljol, bhname, bhjob, bhgwan ) ');
saveq1.sql.add(' values ( :hakbun, :kname, :hname, :ename, :grade, :juya, :hakgwa, :sex, ) ');
saveq1.sql.add(' ( :bjpost, :bjjuso1, :bjjuso2, :hspost, :hsjuso1, :hsjuso2, ) ');
saveq1.sql.add(' ( :gspost, :gsjuso1, :gsjuso2, :hstelno, :taste, :special, :email, ) ');
saveq1.sql.add(' ( :hsbbno, :chulname, :chuljol, :bhname, :bhjob, :bhgwan ) ');
//학번
saveq1.parambyname('hakbun').asstring := ehakbun.text;
//성명(한글,한자,영문)
saveq1.parambyname('kname').asstring := ekname.text;
saveq1.parambyname('hname').asstring := ehname.text;
saveq1.parambyname('ename').asstring := eename.text;
//학년,주야,학과,성별
saveq1.ParamByName('grade').asstring := egrade.items[egrade.itemindex];
saveq1.ParamByName('juya').asstring := ejuya.items[ejuya.itemindex];
saveq1.ParamByName('hakgwa').asstring := ehakgwa.text;
saveq1.ParamByName('sex').asstring := esex.items[esex.itemindex];
//juminno
//전화 번호,이동 전화
saveq1.parambyname('hstelno').asstring := ehstelno.text;
saveq1.parambyname('hsbbno').asstring := ehsbbno.text;
//본적
saveq1.parambyname('bjpost').asstring := ebjpost.Text;
saveq1.parambyname('bjjuso1').asstring := ebjjuso1.text;
saveq1.parambyname('bjjuso2').asstring := ebjjuso2.text;
//주소
saveq1.parambyname('hspost').asstring := ehspost.text;
saveq1.parambyname('hsjuso1').asstring := ehsjuso1.text;
saveq1.parambyname('hsjuso2').asstring := ehsjuso2.text;
//현주소
saveq1.parambyname('gspost').asstring := egspost.text;
saveq1.parambyname('gsjuso1').asstring := egsjuso1.text;
saveq1.parambyname('gsjuso2').asstring := egsjuso2.text;
//출신학교
saveq1.parambyname('chulname').asstring := echulname.text;
saveq1.parambyname('chuljol').asstring := echuljol.text;
//취미,특기,이메일
saveq1.parambyname('taste').asstring := etaste.text;
saveq1.parambyname('special').asstring := especial.text;
saveq1.parambyname('email').asstring := eemail.text;
//보호자
saveq1.parambyname('bhname').asstring := ebhname.text;
saveq1.parambyname('bhgwan').asstring := ebhgwan.text;
saveq1.parambyname('bhjob').asstring := ebhjob.text;
saveq1.execsql;
showmessage('저장 완료.');
close;
end;
에러가 뜨거든요..
제가 처음에 db 필드가 작을때는 에러가 안떳어요..
그래서 db가 길어서 그런거 같아서 짧게 했는데두 안되네요..
에러 메세지는..=
ProjectjungP1.exe raised exception class EDBEngineError with message 'lnvalid use of key word.
Token:)
Line Number:2'.Process stoped Use Step or Run to contiune.
고수분들 해결좀 부탁..
lnvalid use of key word. Token: Line Number:2
님이 BDE로 보낸 쿼리는 아래와 같습니다
insert into mit
( hakbun, kname, hname, ename, grade, juya, hakgwa, sex, )
( bjpost, bjjuso1, bjjuso2, hspost, hsjuso1, hsjuso2,
( gspost, gsjuso1, gsjuso2, hstelno, taste, special, email, )
( hsbbno, chulname, chuljol, bhname, bhjob, bhgwan )
values ( :hakbun, :kname, :hname, :ename, :grade, :juya, :hakgwa, :sex, )
( :bjpost, :bjjuso1, :bjjuso2, :hspost, :hsjuso1, :hsjuso2, )
( :gspost, :gsjuso1, :gsjuso2, :hstelno, :taste, :special, :email, )
( :hsbbno, :chulname, :chuljol, :bhname, :bhjob, :bhgwan )
수정하면..
insert into mit
( hakbun, kname, hname, ename, grade, juya, hakgwa, sex,
bjpost, bjjuso1, bjjuso2, hspost, hsjuso1, hsjuso2,
gspost, gsjuso1, gsjuso2, hstelno, taste, special, email,
hsbbno, chulname, chuljol, bhname, bhjob, bhgwan )
values ( :hakbun, :kname, :hname, :ename, :grade, :juya, :hakgwa, :sex,
:bjpost, :bjjuso1, :bjjuso2, :hspost, :hsjuso1, :hsjuso2,
:gspost, :gsjuso1, :gsjuso2, :hstelno, :taste, :special, :email,
:hsbbno, :chulname, :chuljol, :bhname, :bhjob, :bhgwan )
jungs wrote:
> //입력문임당..
> procedure Thakjf.Button1Click(Sender: TObject);
> begin
> saveq1.close;
> saveq1.sql.clear;
> saveq1.sql.add(' insert into mit ');
> saveq1.sql.add(' ( hakbun, kname, hname, ename, grade, juya, hakgwa, sex, ) ');
> saveq1.sql.add(' ( bjpost, bjjuso1, bjjuso2, hspost, hsjuso1, hsjuso2, ');
> saveq1.sql.add(' ( gspost, gsjuso1, gsjuso2, hstelno, taste, special, email, ) ');
> saveq1.sql.add(' ( hsbbno, chulname, chuljol, bhname, bhjob, bhgwan ) ');
> saveq1.sql.add(' values ( :hakbun, :kname, :hname, :ename, :grade, :juya, :hakgwa, :sex, ) ');
> saveq1.sql.add(' ( :bjpost, :bjjuso1, :bjjuso2, :hspost, :hsjuso1, :hsjuso2, ) ');
> saveq1.sql.add(' ( :gspost, :gsjuso1, :gsjuso2, :hstelno, :taste, :special, :email, ) ');
> saveq1.sql.add(' ( :hsbbno, :chulname, :chuljol, :bhname, :bhjob, :bhgwan ) ');
> //학번
> saveq1.parambyname('hakbun').asstring := ehakbun.text;
> //성명(한글,한자,영문)
> saveq1.parambyname('kname').asstring := ekname.text;
> saveq1.parambyname('hname').asstring := ehname.text;
> saveq1.parambyname('ename').asstring := eename.text;
> //학년,주야,학과,성별
> saveq1.ParamByName('grade').asstring := egrade.items[egrade.itemindex];
> saveq1.ParamByName('juya').asstring := ejuya.items[ejuya.itemindex];
> saveq1.ParamByName('hakgwa').asstring := ehakgwa.text;
> saveq1.ParamByName('sex').asstring := esex.items[esex.itemindex];
>
> //juminno
>
> //전화 번호,이동 전화
> saveq1.parambyname('hstelno').asstring := ehstelno.text;
> saveq1.parambyname('hsbbno').asstring := ehsbbno.text;
> //본적
> saveq1.parambyname('bjpost').asstring := ebjpost.Text;
> saveq1.parambyname('bjjuso1').asstring := ebjjuso1.text;
> saveq1.parambyname('bjjuso2').asstring := ebjjuso2.text;
> //주소
> saveq1.parambyname('hspost').asstring := ehspost.text;
> saveq1.parambyname('hsjuso1').asstring := ehsjuso1.text;
> saveq1.parambyname('hsjuso2').asstring := ehsjuso2.text;
> //현주소
> saveq1.parambyname('gspost').asstring := egspost.text;
> saveq1.parambyname('gsjuso1').asstring := egsjuso1.text;
> saveq1.parambyname('gsjuso2').asstring := egsjuso2.text;
> //출신학교
> saveq1.parambyname('chulname').asstring := echulname.text;
> saveq1.parambyname('chuljol').asstring := echuljol.text;
> //취미,특기,이메일
> saveq1.parambyname('taste').asstring := etaste.text;
> saveq1.parambyname('special').asstring := especial.text;
> saveq1.parambyname('email').asstring := eemail.text;
> //보호자
> saveq1.parambyname('bhname').asstring := ebhname.text;
> saveq1.parambyname('bhgwan').asstring := ebhgwan.text;
> saveq1.parambyname('bhjob').asstring := ebhjob.text;
>
>
> saveq1.execsql;
> showmessage('저장 완료.');
> close;
>
> end;
>
> 에러가 뜨거든요..
> 제가 처음에 db 필드가 작을때는 에러가 안떳어요..
> 그래서 db가 길어서 그런거 같아서 짧게 했는데두 안되네요..
> 에러 메세지는..=
> ProjectjungP1.exe raised exception class EDBEngineError with message 'lnvalid use of key word.
> Token:)
> Line Number:2'.Process stoped Use Step or Run to contiune.
>
> 고수분들 해결좀 부탁..
>
>