 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Sébastien Beaulieu Guest
|
Posted: Wed Feb 23, 2005 9:59 pm Post subject: Field Value Required on TclientDataset |
|
|
Hi,
My problem is, Field or all Required and that ok, I want to create a memory
dataset with a TclientDataset.
I try to Load data from a ClientDataset(Self) to a other
ClientDataset(SourceDataset)
One of the SourceDataset.field[???].value = '
' in the from dataset
and when a assigned it to the other Clientdataset self.Field[???].value =
'';
Did I have a way to set Self.Field[???].value = '
'; ?
procedure TFrwMemDset.LoadFromTDataset(SourceDataset: TDataset);
var
i : integer;
FieldNames : String;
begin
SourceDataset.FieldList.Delimiter := ';';
Self.FieldList.Delimiter := ';';
Assert(Self.FieldList.DelimitedText =
SourceDataset.FieldList.DelimitedText,
'Can''t TFrwMemDset.LoadFromTDataset when Field on different '
+#13#10 +
'Dataset 1 = ' + Self.FieldList.DelimitedText + #13#10 +
'Dataset 2 = ' + SourceDataset.FieldList.DelimitedText);
FieldNames := SourceDataset.FieldList.DelimitedText;
SourceDataset.First;
while not SourceDataset.Eof do begin
Append;
self[FieldNames] := SourceDataset[FieldNames];
// Testing
// for i := 0 to Self.FieldCount -1 do
// self.Fields[i].Value :=
SourceDataset.Fieldbyname(Self.Fields[i].fieldname).Value;
Post;
SourceDataset.Next;
end;
Regard
SB
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|