Configuration with name 'default' not found.

* What went wrong:
A problem occurred configuring project ':app'.
> Could not resolve all dependencies for configuration ':app:_debugApk'.
   > Configuration with name 'default' not found.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option

 to get more log output.

原因: 


阅读更多
换一批

ADOQuery1: Parameter 'name' not found.

05-18

在设计mdi登录窗体时:点“确定”按钮提示错误:ADOQuery1: Parameter 'name' not found.rn大家帮帮我。rn下面是FormLogin的代码:rnunit Unit7;rnrninterfacernrnusesrn Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,rn Dialogs, StdCtrls, DB, ADODB;rnrntypern TFormLogin = class(TForm)rn GroupBox1: TGroupBox;rn Label1: TLabel;rn Label2: TLabel;rn EditName: TEdit;rn EditPassword: TEdit;rn Button1: TButton;rn Button2: TButton;rn ADOQuery1: TADOQuery;rn ADOConnection1: TADOConnection;rn procedure FormKeyPress(Sender: TObject; var Key: Char);rn procedure Button2Click(Sender: TObject);rn procedure Button1Click(Sender: TObject);rn privatern Private declarations rn publicrn Public declarations rn end;rnrnvarrn FormLogin: TFormLogin;rnrnimplementationrnrnuses Main;rn$R *.dfmrnprocedure TFormLogin.Button1Click(Sender: TObject);rn Varrn AQuery:TADOQuery;rn sResult,sPw: string;rnbeginrn adoquery1.Close;rn adoquery1.SQL.Clear;rn adoquery1.SQL.Add('select * from pubyhmcb where useno=:name');rn adoquery1.Parameters.ParamByName('name').Value:=editname.Text;rn adoquery1.Open;rn if adoquery1.RecordCount<>0 thenrn beginrn sPw:=trim(adoquery1.FieldByName('password').AsString);rn AQuery := TADOQuery.Create(nil);rn AQuery.Connection :=adoquery1.connection;rn tryrn AQuery.Close;rn AQuery.SQL.Text := 'exec pr_cims_Encry'''+trim(editname.Text)+''','''+sPw+''',1';rn AQuery.Open;rn sResult:= AQuery.Fieldbyname('pw').AsString;rn finallyrn AQuery.Close;rn AQuery.Free;rn end;rn if sResult=trim(editpassword.Text) thenrn begin showmessage('成功登录');rn formlogin.Hide ;rn formmain.Show;rn end elsern showmessage('登录失败');rn exit;rn endrn else beginrn messagedlg('用户不存在!',mtinformation,[mbOK],0) ;rn exit;rn end;rn end;rnrnprocedure TFormLogin.Button2Click(Sender: TObject);rnbeginrnclose; //退出rnend;rnrnprocedure TFormLogin.FormKeyPress(Sender: TObject; var Key: Char);rnbeginrn if (key=#13) and (activecontrol is Tedit) thenrn beginrn key:=#0;rn perform(wm_nextdlgctl,0,0);rn end;rnend;rnend.

没有更多推荐了,返回首页