为什么AdoTable.Locate('Oper_Name',Edit1.Text,[loCaseInsensitive]) 有时候出错,有时候不出错?

thygw 2002-01-10 05:59:32
...全文
107 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
thygw 2002-01-10
  • 打赏
  • 举报
回复
呵呵,买单
王集鹄 2002-01-10
  • 打赏
  • 举报
回复
你没有理解我的意思吗?
if Length(Edit1.Text) <= ADOTable1.FieldByName('Oper_Name').DataSize then
ADOTable1.Locate('Oper_Name', Edit1.Text, [loCaseInsensitive]);

当搜索字符的宽度大于表字段的宽度就会触发异常
thygw 2002-01-10
  • 打赏
  • 举报
回复
ShowMessage('试试看');


还是不能编译!
王集鹄 2002-01-10
  • 打赏
  • 举报
回复
if Length(Edit1.Text) > ADOTable1.FieldByName('Oper_Name').DataSize then
ShowMessage('试试看');

ADOTable1.Locate('Oper_Name', Edit1.Text, [loCaseInsensitive]);
thygw 2002-01-10
  • 打赏
  • 举报
回复
天哪,怎么没有人回答我?
thygw 2002-01-10
  • 打赏
  • 举报
回复
急死我了!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

5,388

社区成员

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

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