Recent

Author Topic: freetds, cannot get around "some character(s) could not be converted" error  (Read 153 times)

sysrpl

  • Full Member
  • ***
  • Posts: 230
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:

Quote
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:

Quote
[global]
client charset = UTF-8

And when I use the tsql command in a Linux terminal with my server I get the following:

Quote
tsql -H <server_name> -p 1433 -U <user_name>
Password:
locale is "en_US.UTF-8"
locale charset is "UTF-8"
using default charset "UTF-8"
1> exit

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

End the end all my attempts result in the same thing. I get that error message when I apply and commit, and no changes are applied on the actual database.

Does anyone have any suggestions?