我不明白以下行的含义:
WHILE 1 = 1
BEGIN
FETCH NEXT FROM SomeCursor INTO @SomeId, @SomeOtherColumn
IF @@FETCH_STATUS <> 0 BREAK
Run Code Online (Sandbox Code Playgroud)
1 = 1时有什么含义?如果获取状态不是0?
谢谢
我TDBMemo在 Delphi 7 中使用一个控件。我想防止用户将CTRL+V.
此解决方案不起作用:
procedure TForm1.Edit1KeyPress(Sender: TObject; var Key: Char);
begin
if (Key=#22) or (Key=#3) then Key:=#0; // 22 = [Ctrl+V] / 3 = [Ctrl+C]
end;
Run Code Online (Sandbox Code Playgroud)
所以,我尝试了别的东西:
if (Key=#86) then Key := #0; // this is ok, doesnt allow letter v.
Run Code Online (Sandbox Code Playgroud)
但是当我尝试:
if (Key=#17) AND (Key=#86) then Key := #0; // #17 is supposed to be CTRL value...
Run Code Online (Sandbox Code Playgroud)
它不起作用。