Hi,
I was indeed using just varchar fields. Changing them to nVarchar did not help. I am still not able to save
some of the letters.
Do you think the regional settings might have anything to do with it?
Main Topics
Browse All TopicsHi,
I have a vb6 app that will be used in the Czech Republic .
I can type in Czech but the data saved is missing some characters.
I have 2 database fields for testing. One has collation SQL_Czech_CP1250_CI_AS
and the other Czech_BIN. Both do not save all the characters.
The server and database default collations are SQL_Latin1_General_CP1_CI_
The database server is using english regional settings.
How can I enter all the czech characters?
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
http://msdn2.microsoft.com
ALTER DATABASE Products
COLLATE Czech_CI_AI
Another thing... VB6 may or may not be Unicode aware:
http://www.vbforums.com/sh
TJust to let you know which letters I am missing look at this link:
http://www.science.co.il/L
Decimals: 200, 204, 216 & 217
This is what is called as "Internationlization using VB"(google for it to learn more)...its a bit of a clumpsy thing. We have once tried to do internationlization with Collations...but there seemed to be problem with VB and not with SQL...if you use your query analyzer and try to insert with any collation it will accept but not with VB...
so after many thoughts we used some unicode third party controls that are available in the market. I can suggest you to use them, but it nearly took a month for us to do the convertion...but the results were promising.
this was some years ago(we are in .net now and no third part controls)...iam not sure wht is up in the market for VB anymore...
Hey Dennis,
Are you checked if the characters aren't updated or they are just problematic to pull / display ?
Eg. What is saved instead of that characters, it's a low possibility for the sql server to just pass them. Have you tried to get the length like
select len(myField) from myTable where ID = xx
does it show the length of the string without counting the missing characters?
if they seem to be there, can you try something like
select ascii(substring(myField,ch
and see if the character code you get is right?
try these from query analyzer,
declare @myString varchar(50)
set @myString = char(200) -- your problematic character
select @myString, ascii(@myString)
update myTable set myField = @myString where ID = xx
select myField, len(myField), ascii(myField) from myTable where ID = xx
and
declare @myString varchar(50)
set @myString = 'A' -- your problematic character
select @myString, ascii(@myString)
update myTable set myField = @myString where ID = xx
select myField, len(myField), ascii(myField) from myTable where ID = xx
jaiganeshsrinivasan:
I have been asured that Czech is a non-unicode language, and want to avoid months of reprogramming as I only have a couple of weeks to get this up and running.
Harris / Angellll (Thanks for taking a look AngelIII !!)
Here is the code.
Public Function OpenADOcnn() As Boolean
Dim sConnStr As String
Set AdoConn = New ADODB.Connection
On Error GoTo errorhandler
With AdoConn
sConnStr = "Provider=" & Trim(gsProvider) & "" & ";" & "Data Source=" & Trim(gsDataSource) & "" & ";" & "OLE DB Services= -2;uid=TestDB;pwd=12345;In
.ConnectionString = sConnStr
.Open
End With
AdoConn.Execute "SP_SetAppRole 'TraxIT', {ENCRYPT N '12345'}, 'odbc'"
OpenADOcnn = True
intConns = intConns + 1
Exit Function
errorhandler:
OpenADOcnn = False
errorM "OpenADOcnn"
End Function
Private Sub UpdateCustomer()
On Error GoTo errorhandler
OpenADOcnn
SQLExec = "UPDATE tblCust SET " & _
" Naam = " & SQLQuote(Me.txtNaam) & ", " & _
" DebNr = " & Me.txtNRDebNr & ", " & _
" CredNr = " & Me.txtNRCredNr & ", " & _
" Straat = " & SQLQuote(Me.txtAdres) & ", " & _
" Postcode = " & SQLQuote(Me.txtPC) & ", " & _
" Plaats = " & SQLQuote(Me.txtPlaats) & ", " & _
" Land= " & glLandID & ", " & _
" Telefoonnummer = " & SQLQuote(Me.txtTelefoon) & ", " & _
" Faxnummer = " & SQLQuote(Me.txtFax) & ", " & _
" Email = " & SQLQuote(Me.txtEMail) & ", " & _
" Website = " & SQLQuote(Me.txtWeb) & ", " & _
" PBPostbus = " & Trim(SQLQuote(Me.txtPBPB))
" PBPostcode = " & SQLQuote(Me.txtPBPC) & ", " & _
" PBPlaats = " & SQLQuote(Me.txtPBPLaats) & ", " & _
" PBLand = " & glPBLandID & ", " & _
" BankNaam = " & SQLQuote(Me.txtBanknaam) & ", " & _
" BankAdres = " & SQLQuote(Me.txtBankadres) & ", " & _
" BankPlaats = " & SQLQuote(Me.txtBankplaats)
" RekeningNr = " & SQLQuote(Me.txtRekNr) & ", " & _
" IBAN = " & SQLQuote(Me.txtIBAN) & ", " & _
" BIC = " & SQLQuote(Me.txtBIC) & ", " & _
" Opmerkingen = " & SQLQuote(Me.txtOpm) & ", " & _
" BTWNR = " & SQLQuote(Me.txtBTWNr) & " " & _
" WHERE AdresID= " & Me.txtcustID
AdoConn.Execute SQLExec
AdoConn.Close
Set AdoConn = Nothing
Exit Sub
errorhandler:
errore frmRelatieGegevens, "UpdateCustomer"
End Sub
Copying SQLExec to Query Analyzer shows all the correct charaters.
Running it in QA works but the results are missing the right accents.
MrRobot,
>>Are you checked if the characters aren't updated or they are just problematic to pull / display ?
SEM / Open rows & QA both dispaly the letters incorrectly (Only the accents (caron & ring) are missing)
>>Eg. What is saved instead of that characters, it's a low possibility for the sql server to just pass them.
Sorry, I was unclear. The letters are there but are not the correct letters.
I am only using column colations at the moment. Will try changing the db collation as well.
brb on that one.....
>>set @myString = char(200) -- your problematic character
Not sure what u mean by this. (char(200)'A') ???
>>declare @myString varchar(50)
set @myString = 'A' -- your problematic character
select @myString, ascii(@myString)
update myTable set myField = @myString where ID = xx
select myField, len(myField), ascii(myField) from myTable where ID = xx
Displays the letter without the accent ring, len = 1
e + caron = ascii 101
c + caron = ascii 99
r + caron = ascii 114
u + ring = ascii 117
Just to let you know which letters I am missing look at this link:
http://www.science.co.il/L
Decimals: 200, 204, 216 & 217
>> Not sure what u mean by this. (char(200)'A') ???
I mean the char codes, like char(200), char(204) to pass the string conversion in the compilation. But from your reply I guess that would give you the same results. It looks like it parses the input string using the right collation and converts it to latin collation, so I would try to change the db collation as the first step, column collations has some cons.
>>column collations are to hold data in that collation only, they can't handle most of the conversions, so you have to sort any issues.
But it wasn't holding the right data. Missing 4 letters is a very major con don't you think.
What needs to be converted? ascii codes? Doesn't/shouldn't it just return the stored value?
e + caron = ascii 236
c + caron = ascii 232
r + caron = ascii 248
u + ring = ascii 249
The letter is displayed correctly, but the ascii code is that of a plain 'ol boring e (101)
Would I be able to call data that is stored as e to a vb 6 textbox as (e + caron) after is was saved e + caron?
declare @myString nvarchar(30)
set @myString = (SELECT convert(nvarchar(10),left(
select @myString, ascii(@myString)
this only returned an E (not e + caron)
Business Accounts
Answer for Membership
by: crosan1cPosted on 2007-09-24 at 09:21:20ID: 19949472
What datatype are the fields you are referencing? I haven't had to work with either of the Czech collations before, but if size of the table isn't a huge issue you may try using nvarchar if you happen to be using varchar currently.