TAstaClientSocket.OnCodedParamList
Applies to
TAstaClientSocket
Declaration
property
OnCodedParamList: TCodedParamEvent;
Description
The OnCodedParamList event handles messages sent with the SendCodedParamList
method. Clients and servers have access to the SendCodedParamList method and the OnCodedParamList event.
This event allows you to retrieve the data that was sent. On the server, the OnCodedParamList event has
the client socket passed to it while the client version of OnCodedParamList implicitly knows the server
socket.
Here is the example code that comes with the AstaBDEServer example and the AstaODBCServer example. It corresponds to the code in the sample document in SendCodedParamList.
procedure
TForm1.AstaServerSocket1CodedParamList(Sender: TObject;
Clientsocket: TCustomWinSocket; MsgID: Integer; Params: TAstaParamList);
var
I:Integer;
begin
//if the client calls SendGetCodedParamList the Server would need
to clear
//the Params and add in anything that is needed to send back to the client.
//ASTA will transport it back to the client.
mRequests.Lines.Add('Coded Params for Msgid:' + IntToStr(Msgid));
for I := 0 to Params.Count - 1 do
mRequests.Lines.Add(' Params[' + IntToStr(i)
+ '] ->' +
Params[i].AsString);
end;
When this code is called it parses each item that was sent and displays it in a memo.