[fpc-pascal] TSQLQuery.ApplyUpdates problem with UTF-8
Michael Van Canneyt
michael at freepascal.org
Tue Mar 25 10:25:46 CET 2014
On Tue, 25 Mar 2014, Dennis Poon wrote:
>
>>>
>>> By the way, why isn't a semicolon required at the end of SET NAMES 'utf8'
>>> command? I tried both with and without semicolon and neither raise an
>>> error.
>> Seems, that MySQL is tolerant to this.
>> MySQL supports MULTI_STATEMENTS, which enables client to pass multiple
>> statements separated by ";" in one string.
>> So may be, that MySQL interprets ";" as delimiter between multiple
>> statements on one batch.
>> If you use only one sql statement it is always better do not use
>> terminating ";" IMHO
>>
>> -Laco.
>>
> The strange thing is, when we use MYSQL's interactive command line client, a
> semi colon is always required for EACH SQL Statement.
That is because the mysql client program needs to know when to send the command.
The server does not need the semicolon, the client does. As soon as it encounters
the semicolon, it will send all you have entered to the server.
Michael.
More information about the fpc-pascal
mailing list