代码是这样的:
if unit2.DataModule_mis.Table_sc('sno',edit1.Text,[loCaseInsensitive])
then showmessage('ok!) ;
错误信息如下:
[Error] Unit1.pas(86): Missing operator or semicolon
[Error] Unit1.pas(86): Undeclared identifier: 'loCaseInsensitive'
[Error] Unit1.pas(87): Type of expression must be BOOLEAN
[Error] Unit1.pas(87): Unterminated string谁能告诉我这是为什么呢?
还有 在查询方式中,Findkey Locate 还有Lookup三种方式,各有什么区别呢?
那种方式更好呢?
望高手赐教!
if unit2.DataModule_mis.Table_sc('sno',edit1.Text,[loCaseInsensitive])
then showmessage('ok!) ;
错误信息如下:
[Error] Unit1.pas(86): Missing operator or semicolon
[Error] Unit1.pas(86): Undeclared identifier: 'loCaseInsensitive'
[Error] Unit1.pas(87): Type of expression must be BOOLEAN
[Error] Unit1.pas(87): Unterminated string谁能告诉我这是为什么呢?
还有 在查询方式中,Findkey Locate 还有Lookup三种方式,各有什么区别呢?
那种方式更好呢?
望高手赐教!
begin
showmessage('ok!') ;
end
if unit2.DataModule_mis.Table_sc('sno',edit1.Text,[loCaseInsensitive]) then
[Error] Unit1.pas(86): Undeclared identifier: 'loCaseInsensitive'
loCaseInsensitive : 加入定义它的单元到你的单元
[Error] Unit1.pas(87): Type of expression must be BOOLEAN
检查你的Table_sc('sno',edit1.Text,[loCaseInsensitive]) 是否是返回Boolean型
[Error] Unit1.pas(87): Unterminated string
showmessage('ok!) ; = ShowMessage('OK!');
参数类型不正确
[Error] Unit1.pas(86): Undeclared identifier: 'loCaseInsensitive'
未定义的变量在uses里加上DB单元
[Error] Unit1.pas(87): Type of expression must be BOOLEAN
表达式必须是BOOLEAN类型的值
[Error] Unit1.pas(87): Unterminated string
不合理的字符FindKey一般是如果有索引就用它来查找
Locate和Lookup都是用来查找
都有三个参数
唯一不同就是如果 Lookup找到符合的记录就返回一个值
Locate如果找到符合的记录就把指针指向那条记录