Unicode characters in select command
Posted: Tue 09 Oct 2007 22:17
Hi,
I have an application writen in Delphi 2007 and database on MSSQL.
When command text has unicode chararacters (SELECT * FROM Table WHERE ID='Ф001' )
and application is started on a local machine with regional settings set to English, unicode characters
are converted to "?" and command traced with SQL Profiler is "Select * from Table WHERE ID='?001'".
There is not possible to change default charset on the local machine.
With standard Delphi dbExpress driver dbxmss30.dll, Command is ok.
When command has parameter SELECT * FROM Table WHERE ID=:ID
...Param[0].ASWideString := 'Ф001' there is no problem.
Best Regards,
Maleks
I have an application writen in Delphi 2007 and database on MSSQL.
When command text has unicode chararacters (SELECT * FROM Table WHERE ID='Ф001' )
and application is started on a local machine with regional settings set to English, unicode characters
are converted to "?" and command traced with SQL Profiler is "Select * from Table WHERE ID='?001'".
There is not possible to change default charset on the local machine.
With standard Delphi dbExpress driver dbxmss30.dll, Command is ok.
When command has parameter SELECT * FROM Table WHERE ID=:ID
...Param[0].ASWideString := 'Ф001' there is no problem.
Best Regards,
Maleks