Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.

ID: 12457, Fix sending of DateTime Optional parameters

by Dan Miser Email: Anonymous

Download Details
FTP  download also available 0 bytes
CDN Login Required to Download. (You will be redirected to the login page if you click on the Download Link)
To download this, you must have registered:
A free membership

For Delphi, Version 2.0  to 2.0 20 downloads
Copyright: No significant restrictions

Size: 0 bytes
Updated on Fri, 14 May 1999 00:00:00 GMT
Originally uploaded on Fri, 14 May 1999 00:00:00 GMT
// Fixes fetching of DateTime type Optional parameters
procedure TCustomPacketWriter.AddAttribute(Area: TPcktAttrArea; const
ParamName: string;
const Value: OleVariant; IncludeInDelta: Boolean);
DateRec: TDateTimeRec;
TimeStamp: TTimeStamp;
if ParamType = dsfldZSTRING then
ParamType := (dsfldZSTRING shl dsSizeBitsLen) or dsVaryingFldType
or SizeOf(Word);
ParamLen := Length(Value) + 1;
PWord(FBuffer)^ := ParamLen;
Inc(ParamLen, SizeOf(Word));
StrPCopy(@FBuffer[SizeOf(Word)], Value);
end else
(**) (* Josh Dahlby (99-04-21): Add the following code *)
if ParamType = dsfldTIMESTAMP then
TimeStamp := DateTimeToTimeStamp(Value);
DateRec.DateTime := TimeStampToMSecs(TimeStamp);
Move(DateRec, PByte(FBuffer)^, ParamLen);
ParamType := ParamType shl dsSizeBitsLen or SizeOf(TDateTimeRec);
end else
(* End add *)
if VarIsArray(Value) then

   Latest Comments  View All Add New

Move mouse over comment to see the full text

Could not retrieve comments. Please try again later.

Server Response from: ETNACDC03