Rik van Kekem <r...@graficalc.nl> schreef op 8 augustus 2023 07:20:46 CEST:
>
>You need to do
>Buffer := #3 + 'show databases';
>And then the line with length buffer, without the #3.
>
>Didn't I do it like that already in ExecuteCommand??
Yeah. I had this .
function TMariaDBConnector.Query(SQL: string): string;
begin
Result := ExecuteCommand(COMMAND_QUERY, SQL);
end;
And then in ExecuteCommand I put the length and package number in front before
sending.
Buffer := Command + SQL;
Buffer := chr(length(buffer)) + #0#0 + #0 + Buffer;
if Debug then writeln('sending command ', SQL);
Sock.SendString(Buffer);
It's best you do it like this so you can reuse code for executing different
commands.
Was this not working for you??
Grtz,
Rik
--
Verstuurd vanaf mijn Android apparaat met K-9 Mail. Excuseer mijn beknoptheid.
_______________________________________________
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public