出错提示 capability not supported 错在哪啊??? 原代码

csdnadmin 2002-06-04 02:03:17
出错提示 capability not supported
错在哪啊???

begin
with query do
begin
Close;
SQL.Clear;
SQL.Add('select * from login where user ='''+trim(name_edit.text)+'''');
Open;
if RecordCount < 1 then
begin
Application.MessageBox('提示:用户名不存在,请重新输入','提示',mb_ok + mb_iconinformation);//Pchar
name_edit.Clear;
pass_edit.Clear;
name_edit.SetFocus();
Exit;
end;
if Locate('password',Trim(Pass_edit.Text),[]) then
begin
Visible := False;
form2.showModal;
//主窗体打开并提示登录成功;
end
else
begin
Application.MessageBox('提示:密码不正确,请重新输入','提示',MB_OK + MB_Iconinformation);
pass_edit.Clear;
pass_edit.SetFocus;
exit;
end;
end
end;
...全文
333 11 打赏 收藏 转发到动态 举报
写回复
用AI写文章
11 条回复
切换为时间正序
请发表友善的回复…
发表回复
andyting 2002-06-05
  • 打赏
  • 举报
回复
begin
if Trim(edit1.Text) = '' then
begin
Application.MessageBox('对不起,请输入用户名再进行登录','提示',mb_ok + mb_IconInformation);
Exit;
end;
with query do
begin
Close;
SQL.Clear;
SQL.Add('select * from login ');//where user ='''+trim(name_edit.text)+'''');
PrePare;
Open;
if Not (Locate('user',Trim(edit1.Text),[])) then
begin
Application.MessageBox('提示:用户名不存在,请重新输入','提示',mb_ok + mb_iconinformation);//Pchar
edit1.Clear;
pass_edit.Clear;
edit1.SetFocus();
Exit;
end;
if Locate('password',Trim(Pass_edit.Text),[]) then
begin
dl := True;
//Form1.Close;
form2.show;
//主窗体打开并提示登录成功;
end else
begin
Application.MessageBox('提示:密码不正确,请重新输入','提示',MB_OK + MB_Iconinformation);//中文提示啊
pass_edit.Clear;
pass_edit.SetFocus;
exit;
end;
end;
一定行!!!!!
ihihonline 2002-06-04
  • 打赏
  • 举报
回复
哎,是数据库和sql不支持
ihihonline 2002-06-04
  • 打赏
  • 举报
回复
哎,是数据库和sql不支持
TechnoFantasy 2002-06-04
  • 打赏
  • 举报
回复
看看这篇Borland自己的文章:

http://community.borland.com/article/0,1410,25183,00.html
Handling the "Capability not supported" error
csdnadmin 2002-06-04
  • 打赏
  • 举报
回复
不行啊
andyfing 2002-06-04
  • 打赏
  • 举报
回复
if Locate('password',Trim(Pass_edit.Text),[]) then //[]缺少参数

填入
loCaseInsensitive

loPartialKey
csdnadmin 2002-06-04
  • 打赏
  • 举报
回复
执行没问题。可是我在运行是输入用户名和密码时 ,提示 capability not supported
csdnadmin 2002-06-04
  • 打赏
  • 举报
回复
执行没问题。可是我在运行是输入用户名和密码时 ,提示 capability not supported
outer2000 2002-06-04
  • 打赏
  • 举报
回复
end;
end;;;;;;;;;;;;;;;;;;
end;
taxi 2002-06-04
  • 打赏
  • 举报
回复
自己跟踪一下看一下执行到哪里错。
taxi 2002-06-04
  • 打赏
  • 举报
回复
自己跟踪一下看一下执行到哪里错。

5,388

社区成员

发帖
与我相关
我的任务
社区描述
Delphi 开发及应用
社区管理员
  • VCL组件开发及应用社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧