下面是我全部的代码:
- Delphi(Pascal) code
unit Unit1;interfaceusesWindows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, DB, ADODB, StdCtrls, Mask, DBCtrls, wwdbedit, Grids, Wwdbigrd, Wwdbgrid, Menus, ExtCtrls;type TForm1 = class(TForm) Button1: TButton; Button2: TButton; Edit1: TEdit; Edit2: TEdit; Edit3: TEdit; ADOConnection1: TADOConnection; GroupBox1: TGroupBox; Label2: TLabel; Label1: TLabel; Label3: TLabel; Edit7: TEdit; Edit8: TEdit; Edit9: TEdit; GroupBox2: TGroupBox; Label7: TLabel; Label8: TLabel; Label9: TLabel; Edit13: TEdit; Edit14: TEdit; Edit15: TEdit; Button5: TButton; Button6: TButton; wwDBEdit10: TwwDBEdit; MainMenu1: TMainMenu; N1: TMenuItem; N3: TMenuItem; N4: TMenuItem; procedure Button2Click(Sender: TObject); procedure Button6Click(Sender: TObject); procedure Button1Click(Sender: TObject); procedure Button5Click(Sender: TObject); procedure FormClose(Sender: TObject; var Action: TCloseAction); procedure N4Click(Sender: TObject); private { Private declarations } public { Public declarations } end;var Form1: TForm1;implementation{$R *.dfm} //进货单下表更新----------------------------这段代码更新数据更新步了-----------------------------------------procedure TForm1.Button2Click(Sender: TObject);var sSQL1: String;beginbeginif (trim(Edit2.Text) <> '') or (trim(Edit2.Text) <>'')or(trim(Edit2.Text)<>'') thensSQL1 :='update ANT SET VEN=''' + Edit2.Text + ''',CUR=''' + Edit3.Text + ''' WHERE PANNO=''' + Edit1.Text + '''';ADOConnection1.Execute(sSQL1); ShowMessage('上表更新完成');end;end;-----------------------------这段代码更新数据更新步了--------------------------- //采购订单下表更新procedure TForm1.Button6Click(Sender: TObject);var sSQL3: String;beginif (trim(Edit13.Text) <> '') or (trim(Edit14.Text) <>'')or(trim(Edit15.Text)<>'') thenbeginsSQL3 :='UPDATE POT SET VEN=''' + Edit14.Text + ''',CUR=''' + Edit13.Text + ''' WHERE PORNO=''' + Edit15.Text + '''';ADOConnection1.Execute(sSQL3); ShowMessage('下表更新完成');end;end; //进货单上表更新procedure TForm1.Button1Click(Sender: TObject);var sSQL:string;beginbeginif (trim(Edit2.Text) <> '') or (trim(Edit2.Text) <>'')or(trim(Edit2.Text)<>'') thensSQL :='update MAINAN SET VEN=''' + Edit2.Text + ''',CUR=''' + Edit3.Text + ''' WHERE PANNO=''' + Edit1.Text + '''';ADOConnection1.Execute(sSQL); ShowMessage('上表更新完成');end;end; //采购订单上表更新procedure TForm1.Button5Click(Sender: TObject);var sSQL2:string;beginbeginif (trim(Edit13.Text) <> '') or (trim(Edit14.Text) <>'')or(trim(Edit15.Text)<>'') thensSQL2 :='UPDATE MAINPO SET VEN=''' + Edit14.Text + ''',CUR=''' + Edit13.Text + ''' WHERE PORNO=''' + Edit15.Text + '''' ;ADOConnection1.Execute(sSQL2); ShowMessage('上表更新完成');end;end;procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction);beginApplication.Terminateend;procedure TForm1.N4Click(Sender: TObject);beginApplication.Terminateend;end.
是代码错误还是怎么的弄不明白
------解决方案--------------------------------------------------------
题目太难,分太少