Retrieve Cyrillic data
- From: "Alberto" <a.richart@xxxxxxxxxxxxx>
- Date: Wed, 10 Jan 2007 10:41:51 +0100
Hi all,
I have a table which holds the Translation of my GUI.
I load in Visual Basic 6 the translation from the database and then I update
the caption of the controls.
However, when I have added a Cyrillic translation, ADO returns question
marks (?) for each cyrillic character.
The piece of code looks like this:
Dim cn As New ADODB.Connection
Dim r As New Recordset
cn.Open "Provider=SQLOLEDB.1;Persist Security Info=False;Data
Source=(local);Initial
Catalog=MyDatabase;UID=sa;PWD=;Trusted_Connection=Yes"
Dim str As String
Set r = cn.Execute("SELECT Caption FROM Translation WHERE ModuleName =
N'MyModule' AND LanguageId = 1049 AND ControlId = 91")
MsgBox r.Fields("Caption").Value
str = r.Fields("Caption").Value
MsgBox str
The field Caption in Translation table is nvarchar(4000). Cyrillic data is
properly stored in the table. I can load data from Management Studio.
Do I need to add a special setting to the connection?
Is it a Visual Basic 6 matter?
Thanks in advance,
Alberto.
.
- Prev by Date: Re: Cannot read data from Access 2007 database
- Next by Date: Re: Stand Alone Recordsets
- Previous by thread: Re: Cannot read data from Access 2007 database
- Next by thread: Re: Stand Alone Recordsets
- Index(es):
Relevant Pages
|
|