[Lazarus] freetds + lazarus cannot get around "some character(s) could not be converted" error

LacaK lacak at zoznam.sk
Mon Jul 29 07:35:10 CEST 2019


Hello,


> I am attempting to write a Lazarus program using a TMSSQLConnection on 
> Linux (Ubuntu 16.04 64 bit) with FreeTDS. Whenever I try to apply 
> updates on my TSQLQuery component and commit the transaction on its 
> associated TSQLtransaction component I receive this error:
>
>     An error occurred while applying the updates in a record:
>     Connection : Error 2403 :
>     Attempt to initiate a new Adaptive Server operation with results
>     pending
>     Some character(s) could not be converted into client's character
>     set.  Unconverted bytes were changed to question marks ('?')
>     Some character(s) could not be converted into client's character
>     set.  Unconverted bytes were changed to question marks ('?')
>     Some character(s) could not be converted into client's character
>     set.  Unconverted bytes were changed to question marks ('?')
>     Some character(s) could not be converted into client's character
>     set.  Unconverted bytes were changed to question marks ('?')
>     .
>
>     Press OK to ignore and risk data corruption.
>     Press Abort to kill the program
>
>
> If I press OK the updates are not actually applied. It looks like no 
> matter what I do I cannot edit field values and have them applied to 
> the SQL server database.
>
> I have tried changing the freetds.conf file to include the following:
>
>     [global]
>     client charset = UTF-8
>
probably try add also:

dump file = freetds.log

then you can look into log file what and when actually happens ...


>
> I have even tried setting the charset property on the TMSSQLConnection 
> to UTF-8.

Yes it is needed

What verision of FPC/Lazarus do you use?
Do you have DefaultSystemCodePage = UTF8 ?
Can you try with TRUNK or 3.2 branch?

What is version of remote SQL Server ?

-Laco.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20190729/c5843215/attachment.html>


More information about the lazarus mailing list