T
tony_j
Unregistered / Unconfirmed
GUEST, unregistred user!
query1.Close;
query1.SQL.Add ('insert into "wenjian.db" (no,name,month,update,reportname,singername,ssbm,sbdw,whdj,bcwz,zlly,sx,bz)');
query1.SQL.add ('values no,:name,:month,:update,:reportname,:singername,:ssbm,:sbdw,:whdj,:bcwz,:zlly,:sx,:bz)');
query1.ParamByName('no').asstring:=noedit.text;
query1.ParamByName('name').asstring:=zlmcedit.text;
query1.ParamByName('month').asstring:=yfedit.text;
query1.ParamByName('reportname').asstring:=sbredit.text;
query1.ParamByName('singername').asstring:=qsredit.text;
query1.ParamByName('ssbm').asstring:=ssbmedit.text;
query1.ParamByName('sbdw').asstring:=sbdwedit.text;
query1.ParamByName('whdj').asstring:=whdjedit.text;
query1.ParamByName('bcwz').asstring:=bcwzedit.text;
query1.ParamByName('zlly').asstring:=combobox1.text;
query1.ParamByName('sx').asstring:=combobox2.text;
query1.ParamByName('bz').asstring:=bzedit.text;
query1.ParamByName('update').asdatetime:=strtodate(sbsjedit.Text);
query1.prepare;
query1.open;
提示错误如下:看不出来insert语句那里出了问题。
project main.exe raised exception class EDBEngineError whit message 'invalid use of keyword, Token: no,name,month........values line '1
query1.SQL.Add ('insert into "wenjian.db" (no,name,month,update,reportname,singername,ssbm,sbdw,whdj,bcwz,zlly,sx,bz)');
query1.SQL.add ('values no,:name,:month,:update,:reportname,:singername,:ssbm,:sbdw,:whdj,:bcwz,:zlly,:sx,:bz)');
query1.ParamByName('no').asstring:=noedit.text;
query1.ParamByName('name').asstring:=zlmcedit.text;
query1.ParamByName('month').asstring:=yfedit.text;
query1.ParamByName('reportname').asstring:=sbredit.text;
query1.ParamByName('singername').asstring:=qsredit.text;
query1.ParamByName('ssbm').asstring:=ssbmedit.text;
query1.ParamByName('sbdw').asstring:=sbdwedit.text;
query1.ParamByName('whdj').asstring:=whdjedit.text;
query1.ParamByName('bcwz').asstring:=bcwzedit.text;
query1.ParamByName('zlly').asstring:=combobox1.text;
query1.ParamByName('sx').asstring:=combobox2.text;
query1.ParamByName('bz').asstring:=bzedit.text;
query1.ParamByName('update').asdatetime:=strtodate(sbsjedit.Text);
query1.prepare;
query1.open;
提示错误如下:看不出来insert语句那里出了问题。
project main.exe raised exception class EDBEngineError whit message 'invalid use of keyword, Token: no,name,month........values line '1