Danijel
The MS SQL field is " [InitVector] varbinary(100) NULL,"
The AV is server side in rtcDB.pas where I have marked it with "<<====="
procedure DelphiDataSetToRtc(DelphiDS:TDataSet; rtcDS:TRtcDataSet; ClearFieldDefs:boolean=True);
var
fdef:TFieldDef;
flds:integer;
fldname:string;
field:TField;
fstream:TStream;
begin
if ClearFieldDefs then
begin
rtcDS.Clear;
for flds:=0 to DelphiDS.FieldDefs.Count-1 do
begin
fdef:=DelphiDS.FieldDefs.Items[flds];
fldname:=fdef.Name;
field:=DelphiDS.FindField(fldname);
if assigned(field) then
if field.FieldKind=fkData then
rtcDS.SetField(fldname,
RTC_DB2FIELD_TYPE(fdef.DataType),
fdef.Size,
fdef.Required);
end;
end;
DelphiDS.First;
while not DelphiDS.EOF do
begin
rtcDS.Append;
for flds:=0 to rtcDS.FieldCount-1 do
begin
fldname:=rtcDS.FieldName[flds];
field:=DelphiDS.FindField(fldname);
if assigned(field) then
if (field.FieldKind=fkData) and not field.IsNull then
if field.isBlob then
begin
fstream:=DelphiDS.CreateBlobStream(field,bmRead);
try
if {$IFNDEF FPC} TBlobField(field).GraphicHeader and {$ENDIF}
( (field.DataType = ftGraphic) or
(field.DataType = ftTypedBinary) ) then
RtcSkipGraphicFieldHeader(fstream);
rtcDS.NewByteStream(fldname).CopyFrom(fstream,fstream.Size-fstream.Position);
finally
fstream.Free;
end;
end
else
try
rtcDS.Value[fldname]:=field.Value; <<<=========== HERE @ line 665 in my version
Except
end;
end;
DelphiDS.Next;
end;
end;
Regards
Zane