delphi在执行adoquery.post时提示dataset not in edit or insert mode错误代码如下: datasource1.DataSet:=QB; QB.Connection:=zhuchuti.conn; QB.Close; QB.SQL.Clear; Qb.SQL.Text:='select * from gds_discount where goodscode='''+goodsco

来源:学生作业帮助网 编辑:作业帮 时间:2024/11/24 23:43:15
delphi在执行adoquery.post时提示dataset not in edit or insert mode错误代码如下:   datasource1.DataSet:=QB;   QB.Connection:=zhuchuti.conn;   QB.Close;   QB.SQL.Clear;   Qb.SQL.Text:='select * from gds_discount where goodscode='''+goodsco
x]OA-,PhI^JwiYgJ*ʷ S"1H N+ӥ_Bg^43g9s;=~sAŒG6ٙW~VLlQqȖ˻ER*J!ҩ Z@N6|tlI8E4)w8 t0 PP 4cc0,)+؂8wq`-H,5)JpR!!- *=)1Y;3t_w3yQ[Ty+ISK=x p7QTUODuHHP�i%ܮܶ”F# 5^A5MklJ('y7Τz%>4L.w"&}h^&Ԙ-rXw>\ֳfp2 H~W*MYAQՀ57_ oUsuڸ69?]##]ɝuW]`n Uk{U57WjKjTsr{V"CVz+WFyO95'~C ;Y{wT\,;V:[zeO,3ng+{y;;xj)')aK?sv^a vq lޥl8Iykag6o=,o1dy2~kͲY^W;{iT|(X"ݖק7

delphi在执行adoquery.post时提示dataset not in edit or insert mode错误代码如下: datasource1.DataSet:=QB; QB.Connection:=zhuchuti.conn; QB.Close; QB.SQL.Clear; Qb.SQL.Text:='select * from gds_discount where goodscode='''+goodsco
delphi在执行adoquery.post时提示dataset not in edit or insert mode错误
代码如下:
datasource1.DataSet:=QB;
QB.Connection:=zhuchuti.conn;
QB.Close;
QB.SQL.Clear;
Qb.SQL.Text:='select * from gds_discount where goodscode='''+goodscode.Text+'''';
Qb.Open;
dbedit1.Text:=QB.fieldbyname('deptcode').AsString;
dbedit2.Text:=QB.fieldbyname('goodscode').AsString;
dbedit3.Text:=QB.fieldbyname('cheapprice').AsString;
dbedit4.Text:=QB.fieldbyname('startdate').AsString;
dbedit5.Text:=QB.fieldbyname('enddate').AsString;
dbedit6.Text:=QB.fieldbyname('starttime').AsString;
dbedit7.Text:=QB.fieldbyname('endtime').AsString;
dbedit8.Text:=QB.fieldbyname('recorddate').AsString;
dbedit9.Text:=QB.fieldbyname('recorder').AsString;
dbedit10.Text:=QB.fieldbyname('approveflag').AsString;
dbedit11.Text:=QB.fieldbyname('checkdate').AsString;
dbedit12.Text:=QB.fieldbyname('checker').AsString;
dbedit13.Text:=QB.fieldbyname('comment').AsString;

dbedit1.Text:=zhuchuti.StatusBar1.Panels[4].Text;
dbedit2.Text:=goodscode.Text;
dbedit3.Text:=cheapprice.Text;
dbedit4.Text:=formatdatetime('yyyy-MM-dd',startdate.Date);
dbedit5.Text:=formatdatetime('yyyy-MM-dd',enddate.Date);
dbedit6.Text:=starttime.Text;
dbedit7.Text:=endtime.Text;
dbedit8.Text:=zhuchuti.StatusBar1.Panels[3].Text;
dbedit9.Text:=zhuchuti.StatusBar1.Panels[1].Text;
dbedit10.Text:='1';
dbedit11.Text:='';
dbedit12.Text:='';
dbedit13.Text:='';
QB.Post;
应该是adoqurey没有处于编辑或插入状态,请问我要在哪里加入QB.exit或QB.insert

delphi在执行adoquery.post时提示dataset not in edit or insert mode错误代码如下: datasource1.DataSet:=QB; QB.Connection:=zhuchuti.conn; QB.Close; QB.SQL.Clear; Qb.SQL.Text:='select * from gds_discount where goodscode='''+goodsco
你对数据库根本没有修改.赋值的时候直接赋给数据库.或者你是不是把方向搞反了..
QB['deptcode']=dbedit1.Text;