我有几个函数弄不清楚,热心的你请帮我一下!

leedeqing 2000-05-31 10:47:00
AssignFieldValue?
Assigned?
clientDataset1.fieldbyname('***').oldvalue中.oldvalue的意思?
system.delete?
大英雄,多谢!!!
我的email地址:leedeqing@163.net
...全文
182 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
alin 2000-06-26
  • 打赏
  • 举报
回复
Assigns the DataType and Value properties from a TField object.
procedure AssignFieldValue(Field: TField; const Value: Variant);
Use AssignFieldValue to set the Value property to the value passed as the Value parameter. AssignFieldValue assumes that the Value represents a value from a field like the Field parameter, and assigns the DataType property accordingly. AssignFieldValue sets the Bound property to True.

Unlike AssignField, AssignFieldValue does not name the parameter after the field object.

function Assigned(var P): Boolean;

Description

Use Assigned to determine whether the pointer or procedure referenced by P is nil. P must be a variable reference of a pointer or procedural type. Assigned(P) corresponds to the test P<> nil for a pointer variable, and @P <> nil for a procedural variable.

Assigned returns False if P is nil, True otherwise.

property OldValue: Variant;

Description

Read the OldValue property to examine or retrieve the original value of the field that was obtained from the dataset before any new values were written to the record buffer. For example, this code replaces current pending changes with a field抯 original value:

NewValue := OldValue;

Once records are posted successfully, the old field value cannot be retrieved.

procedure Delete(var S: string; Index, Count:Integer);

Description

Delete removes a substring of Count characters from string S starting with S[Index]. S is a string-type variable. Index and Count are integer-type expressions.

If Index is larger than the length of S, no characters are deleted. If Count specifies more characters than remain starting at the S[Index], Delete removes the rest of the string.

var

s: string;
begin
s := 'Honest Abe Lincoln';
Delete(s,8,4);
Canvas.TextOut(10, 10, s); { 'Honest Lincoln' }
end;
牛魔王的表弟 2000-06-24
  • 打赏
  • 举报
回复
看帮助!!
kxy 2000-05-31
  • 打赏
  • 举报
回复
帮助中写的一清二楚,你看看不就行了.

5,388

社区成员

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

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