我的ACCESS数据库里面有一个表,它的一个字段UPWD是可以为空的
我在用ADOQUERY进行查询的时候,传入的相对应的参数为''可是老是提示我非法的精度数值
代码如下:
adodata:=tadoquery.Create(nil);
adodata.Connection:=dbase.linkdata;
adodata.SQL.Clear;
adodata.sql.Add('select * from operater where username=:uname and userpwd=:upwd');
adodata.Parameters.ParamByName('uname').Value:=trim(comboboxex1.Text);
adodata.Parameters.ParamByName('upwd').value:=trim(edit1.Text);
if adodata.RecordCount = 0 then
begin
messagedlg('错误的用户名称或者密码.',mtinformation,[mbok],0);
adodata.Close;
adodata.Free;
modalresult:=mrretry;
end
else
begin
adodata.Close;
adodata.Free;
modalresult:=mrok;
end;
end;
当edit1.text为空的时候就出现这个问题了
请各位高手指点
在线等...
我在用ADOQUERY进行查询的时候,传入的相对应的参数为''可是老是提示我非法的精度数值
代码如下:
adodata:=tadoquery.Create(nil);
adodata.Connection:=dbase.linkdata;
adodata.SQL.Clear;
adodata.sql.Add('select * from operater where username=:uname and userpwd=:upwd');
adodata.Parameters.ParamByName('uname').Value:=trim(comboboxex1.Text);
adodata.Parameters.ParamByName('upwd').value:=trim(edit1.Text);
if adodata.RecordCount = 0 then
begin
messagedlg('错误的用户名称或者密码.',mtinformation,[mbok],0);
adodata.Close;
adodata.Free;
modalresult:=mrretry;
end
else
begin
adodata.Close;
adodata.Free;
modalresult:=mrok;
end;
end;
当edit1.text为空的时候就出现这个问题了
请各位高手指点
在线等...
解决方案 »
- 如果POST数据到一个ASP页面进行登陆,再让IE打开时是已经登陆的状态?
- 求助!!!!!!
- 如何设置 主页按钮,就是点击该button后,自动上指定的网站??
- 使用delphi开发vod点播系统,用的是神龙卡5,需不需要神龙卡得开发包,那个东西该怎么控制呀?????
- 关于操作excel2000的问题!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
- D7中用dbexpress连接mssql2000是出错
- 我的Access数据库已经有20M了,现在经常会损坏,该怎样避免这种情况?
- 请问有什么办法可以对webbrowser局部放大?
- DBLookupListBox 中有多行数据,鼠标点击某一行时为什么全部行都高亮而不是单独点击的那一行高亮?
- 讨论,在DELPHI5.0用程序实现对SQL SERVER7.0中的数据库恢复,(备份已搞定).
- open和execsql有啥区别
- 如何在组件中,增加自定义的图形。
----------------------------------------------------------------
花自飘零水自流,一种相思,两处闲愁。
此情无计可消除,才下眉头,又上心头。
----------------------------------------------------------------
这个字段估计你是设置成数字的了,把它改成文本的试
如果是文本的话,绝对没问题的。