爱
爱上猫的鱼
Unregistered / Unconfirmed
GUEST, unregistred user!
case DBGrid1.SelectedIndex of //需要解释
2:
begin
str:=InputBox('Modify','更改为',DBGrid1.SelectedField.AsString);//需要解释
try
Table1.Edit;
DBGrid1.SelectedField.AsString:=str;//DBGrid1.SelectedField.AsString需要解释
except
ShowMessage('input error');
Exit;
end;
end;
end;
end;
procedure TForm1.DBGrid1Exit(Sender: TObject);
begin
if MessageDlg('确定要保存吗?',mtConfirmation,[mbyes,mbno],0)=mryes then //解释
begin
Table1.ApplyUpdates;//解释
Table1.CommitUpdates;//解释
end
else
begin
Table1.CancelUpdates;//解释
end;
end;
2:
begin
str:=InputBox('Modify','更改为',DBGrid1.SelectedField.AsString);//需要解释
try
Table1.Edit;
DBGrid1.SelectedField.AsString:=str;//DBGrid1.SelectedField.AsString需要解释
except
ShowMessage('input error');
Exit;
end;
end;
end;
end;
procedure TForm1.DBGrid1Exit(Sender: TObject);
begin
if MessageDlg('确定要保存吗?',mtConfirmation,[mbyes,mbno],0)=mryes then //解释
begin
Table1.ApplyUpdates;//解释
Table1.CommitUpdates;//解释
end
else
begin
Table1.CancelUpdates;//解释
end;
end;