我初学DELPHI 输入用户名之后点回车.出现以下错误.该如何处理
project jsl.exe raised exception class EOleException with message '连接字符串属性无效 '
Process stopped .Use Step or Run to continue
project jsl.exe raised exception class EOleException with message '连接字符串属性无效 '
Process stopped .Use Step or Run to continue
解决方案 »
- 如何自动生成Button控件?
- 使用reportmachine3.0打印空报表会报错,有办法解决吗
- Delphi7.0简体中文版已经发布一年多了怎么一直没有在网上看到,哪位大侠知道哪里有,小弟在这里谢过了。。。
- Delphi写的DLL怎样传递字符串给VB?
- 读取DBGrid 数据问题?
- 100分 如何实现多层结构的数据同步Transaction
- 存储过程无法返回纪录集?
- 在我的程序中要实现对一SQL server数据库备份与恢复,我该怎么做呢?
- GUID菜鸟请教众大侠
- 如何在DBGRID中显示MEMO字段的内容?(小弟急)
- 用过Virtual TreeView的进来看看!
- ~~~~~求助~~~~~关于TDataSet和DataSet的关系,详情请进!
procedure TfrmLogin.btnOKClick(Sender: TObject);
var q:TadoQuery;
begin
userid:=txtUserId.Text;
q:=TadoQuery.Create(nil);
q.Connection:=data.Connection;
q.SQL.Text:='SELECT * FROM Users WHERE UserID='+quotedstr(userid);
q.Prepared;
q.Open;
if(q.Bof=true)and(q.Eof=true) then
begin
messagedlg('没有此用户名,请与管理员联系!',mtinformation,[mbOK],0);
q.Close;
q.Free;
logCount:=logCount+1;
txtUserID.SetFocus
end
else
begin
Password:=q.fieldbyname('Password').AsString;
if Password<>'' then Password:=UncrypStr(Password,pKey);
if txtPassword.Text=Password then
begin
username:=q.fieldbyname('Name').AsString;
Manage:=q.FieldByName('Manage').AsBoolean;
q.Close;
q.Free;
LogOk:=true;
close
end
else
begin
messagedlg('密码错误,请重新输入!',mtinformation,[mbOK],0);
logCount:=logCount+1;
q.Close;
q.Free;
txtPassword.SetFocus
end;
end;
if logCount=3 then
begin
LogOk:=false;
close
end;
end;
或者是 你的adoquery没有连接到adoconnection上