Page 1 of 1

Character set problems.

Posted: Fri 14 Oct 2005 11:43
by bdipso
Hi we have an application written in Delphi. And it is using your dbx components to connect database. (We did not wrote this application)

We have problems with Turkish characterset. First; if we change MS SQLServers collation to Turkish... application does not work, because of some capital letter differences in Turkish.

So we decided to use Latin2_CP1 collation on SQL Server, and we changed only collation of the fields that user can enter text data to Latin1_CP1254

Now if we use dbexpmss.dll we can enter Turkish data to these fields, but some parts of the program is not working.

if we use dbexpsda.dll it converts Turkish caharacters to Latin equivalents.

Is there a way that I can correct this using dbxconnections.ini or dbxdrivers.ini? Because we can not modify the program.

Best regards.

Posted: Fri 14 Oct 2005 14:48
by Ikar
Do you have Turkish as default charset on your system?

Posted: Mon 17 Oct 2005 09:17
by bdipso
Yes, Turkish is the default Locale, Language, Keybord Layout, Language for unicode programs ..... , whatever you can find under "Regional and Language options"

SQL Servers Language is Latin1_General_CP1_CI_AS
Databases Language is Latin1_General_CP1_CI_AS
Collations of All the tables are Latin1_General_CP1_CI_AS
Only collation of some varchar and nvarchar fields are Turkish_CI_AS.

Posted: Mon 17 Oct 2005 09:40
by bdipso
Sorry

Only collation of nvarchar fields set to Turkish.

I can write Turkish characters to these fields using SQL Query Analyzer and Borland DbExpress drivers.

We'r using SQL Server 2000 SP 3

Posted: Mon 17 Oct 2005 09:58
by Ikar
Please use SQL Profiler to trace differences in connection between dbexpmss and dbexpsda.dll

Posted: Mon 17 Oct 2005 14:38
by bdipso
Hi,

I tried SQL Profiler

I think the difference is parameter passing :

Your driver passes parameters as VARCHAR, whatever the data type of the table column.

exec sp_executesql
N'update "projwbs" set
"wbs_name" = @P1
where
"wbs_id" = @P2 and
"wbs_short_name" = @P3 and
"wbs_name" = @P4',
N'@P1 varchar(40),@P2 int,@P3 varchar(20),@P4 varchar(36)',
'Multidisciplinary General Contractor şığ', 4264,
'Innovative Construct', 'Multidisciplinary General Contractor'

But Borland Driver passes them as NVARCHAR if the column is NVARCHAR.

declare @P1 int
set @P1=2
exec sp_prepexec @P1 output,
N'@P1 nvarchar(100),@P2 int,@P3 varchar(40),@P4 nvarchar(100)',
N'update "projwbs" set
"wbs_name" = @P1 where
"wbs_id" = @P2 and
"wbs_short_name" = @P3 and
"wbs_name" = @P4',
N'Transportation & Infastructure Division şığ', 4265, 'Infrastructure',
N'Transportation & Infastructure Division'
select @P1

(Sorry, I can make Borland driver work in prepare mode. If I make Prepare SQL=False it still preparing the queries)

I dont want to make this discussion longer, if it is not supporting then it is not supporting.