MsgCommunicator: Delphi Instant Messaging (IM) SDK
for easy creation of custom messenger system


Search for the messages in message history.

function FindMessages(
                      var MessageTextComparison:         TMsgTextComparison;
                      var MessageUnicodeTextComparison:  TMsgTextComparison;
                      var SendingDate:                   TMsgDateComparison;
                      var DeliveryDate:                  TMsgDateComparison;
                      SearchDelivered:                   Boolean;
                      Delivered:                         Boolean = True;
                      MessageText:                       String = ''; 
                      MessageUnicodeText:                WideString = ''; 
                      SenderID:                          Cardinal = MSG_INVALID_USER_ID;
                      RecipientID:                       Cardinal = MSG_INVALID_USER_ID;
                      MessageType:                       TMsgMessageType = aamtNone;
                      MessageDataSize:                   Integer = -1; 
                      OrderBySendingDate:                Boolean = False;
                      OrderByClause:                     String = '';
                      Command:                           Cardinal = 0 
                     ): TDataset;

Call FindMessages to search messages in local or remote message history with conditions and optional sorting.
Message history is stored in messages table of the database. You can customize saving to the messages table using OnSaveMessage event.
This method returns the TDataset descendant object which contains found records from messages table. You must destroy this object after using it.
Default value of any parameter in FindMessages means no condtion on this value.
Server must be started and database must be assigned before calling FindMessages.
You should use database with Unicode support for searching on MessageUnicodeText.

MessageTextComparison MessageUnicodeTextComparison
SendingDate DeliveryDate SearchDelivered
Delivered MessageText MessageUnicodeText
SenderID RecipientID MessageType MessageDataSize

Message text search condition .
Message Unicode text search condition.
Sending date search condition.
Delivery date search condition.
True enables search on Delivered flag, false - disables.
Delivered flag search condition.
Message text search string.
Message Unicode text search string.
UserID of the sender of the message.
UserID of the recipient of the message.
Type of the message.
Size of the binary data for binary and stream messages.
True enables sorting on SendingDate, false - disables.
SQL ORDER BY clause without words ORDER BY.
Example: SenderID ASC, SendingDate DESC.
Custom command number sent by SendCommand

© AidAim Software MsgCommunicator: Delphi Messenger Sdk Instant Messaging Sdk Im Sdk