adoquery1...
adoquery1.sql.add('select password from table1 where name ='''+edit1.text+'''');
adoquery1.open;
if (adoquery1.record>0) and (adoquery1.fieldbyname('password')=edit2.text) then
showmessage('succes') else showmessage('byebye');
adoquery1.sql.add('select password from table1 where name ='''+edit1.text+'''');
adoquery1.open;
if (adoquery1.record>0) and (adoquery1.fieldbyname('password')=edit2.text) then
showmessage('succes') else showmessage('byebye');
解决方案 »
- delphi的spinEdit
- DELPHI 2009用 WMCOPYDATA 为什么有乱码?
- combobox中显示ACCESS数据库中表中的值
- 关于使用cxGrid时的问题。
- 如何判断系统分区是否存在
- 想设计这么一个程序:当我在图形界面下,双点其中的各个文本框,下拉框时,框中的内容能被自动复制到指定的文本文件中?
- 求助:如何编程实现交换鼠标左右键的同时也改变鼠标指针的指向?
- if 语句. 在线等您的回复.
- 为什么我的数据库原来可以用,重装系统后就不能用了呢?
- 求助 那位同志有关于InterBase编程方面的资料可否来一份,[email protected]
- 同志们,你们在编写程序的时候,都是先画流程图的吗
- 这句C++语句用pascal怎么表达呢??
var
Results: Variant;
begin
{用户每按一次确定,计数器自动加1,当计数器等于3时退出系统}
Count := Count + 1;
with MDM do
begin
Results := AQUseri.Lookup('uname', ComboBox1.Text, 'upass');
if Results = LabeledEdit1.Text then {用户输入正确}
begin
Count := 0;
ModalResult := mrOK;
end
else begin
if Count = 3 then
begin
MessageBox(Handle, '密码错误,系统将关闭!',
MBCW, MB_OK + MB_ICONWARNING);
Close;
end
else
MessageBox(Handle, '无此用户或密码不正确,请重新输入!',
MBCI, MB_OK + MB_ICONINFORMATION);
end;
end; // with
end;
[Error] ulog.pas(45): Incompatible types: 'String' and 'TField'
adoquery1.sql.add('select password from table1 where name ='''+edit1.text+'''');
adoquery1.open;
if (adoquery1.record>0) and (adoquery1.fieldbyname('password').asstring=edit2.text) then
showmessage('succes') else showmessage('byebye');
begin
...
end;