I am using Ubuntu 14.04 with freetds and unixODBC to connect to a 2008 Microsoft SQL Server. I tested the connection with tsql
and isql
and it worked correctly. While using isql -v
if I include accents (á,é,í,ó,ú) in the query I receive the following response:
[37000][unixODBC][FreeTDS][SQL Server]Incorrect syntax near '?'.
[ISQL]ERROR: Could not SQLExecute
While installing freetds and unixODBC packages I received a warning message saying that special characters would not be accepted unless an extra package was but I can't which one it was. To try and solve this problem I uninstalled freetds and unixODBC, reinstalled them and did not receive any warning message but I am still receiving the same error message when including accents in the queries.
PS: This is the first question I make so sorry if it is vague or incomplete.
After trying for a long while the solution I found was quite simple and worked with
tsql
andisql
. On the data source file for unixODBC I needed to setTDS_Version=8.0
.The file before:
The new file: