RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TXSDate Class

TXSDate implements the XML schema date type so that it can be used on invokable interfaces.

Pascal
TXSDate = class(TRemotableXS);
C++
class TXSDate : public TRemotableXS;

TXSDate acts as a wrapper for the simple scalar type date that W3C defines for XML schemas. Because this type does not correspond directly to a Delphi or C++ type, it requires special marshaling when used in an invokable interface. TXSDate enables this marshaling because it is a descendant of TRemotable

To convert a TXSDate value to a TDateTime value, use the AsDate property. Other properties give the Year, Month, and Day that make up that value. 

On server applications, instances of TXSDate that are input parameters on an invokable interface are automatically created when the method call is unmarshaled and automatically freed after any output parameters or return value are marshaled so that they can be sent to the client. When a TXSDate instance is created in a method that was called remotely using an invokable interface, the instance is automatically freed after the value of the TRemotable descendant is marshaled for transport back to the client application. 

The caller of an invokable interface (client) is responsible for creating any TXSDate instances that it passes as input parameters, and for freeing any TXSDate instances it creates or that are returned as output parameters or method results. 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!