Problem with russian/ukrainian charset
Problem with russian/ukrainian charset
Hello.
I have a problem with russian/ukrainian charset in my program.
I use VS 2005 + C#(Compact Framework 2.0) + dotConnect for Oracle 5.00 Mobile Trial (5.0.12.1) on Windows CE 5.0 (English) + Oracle 10.2
NLS_CHARACTERSET = CL8MSWIN1251
This problem is like this http://www.devart.com/forums/viewtopic.php?t=10898
I have the same characters.
Help me please to slove it.
I have a problem with russian/ukrainian charset in my program.
I use VS 2005 + C#(Compact Framework 2.0) + dotConnect for Oracle 5.00 Mobile Trial (5.0.12.1) on Windows CE 5.0 (English) + Oracle 10.2
NLS_CHARACTERSET = CL8MSWIN1251
This problem is like this http://www.devart.com/forums/viewtopic.php?t=10898
I have the same characters.
Help me please to slove it.
Sorry for the inconvenience. The reason was in our sample code - the connection property was reinitialized in the btConnect_Click() method. dotConnect for Oracle works fine.
1. Have you set the Unicode property to true in your code?
2. What is the type of the columns from which you retrieve russian and ukrainian symbols?
3. Have you tried to add russian and ukrainian language on your Windows CE 5.0?
4. How do you retrieve data from database? Please provide us with the code sample.
We have tried to use our provider with Oracle 10.2.0.1 database that has the same charset. It works normally.
1. Have you set the Unicode property to true in your code?
2. What is the type of the columns from which you retrieve russian and ukrainian symbols?
3. Have you tried to add russian and ukrainian language on your Windows CE 5.0?
4. How do you retrieve data from database? Please provide us with the code sample.
We have tried to use our provider with Oracle 10.2.0.1 database that has the same charset. It works normally.
1. OracleConnection.ConnectionString = "user id=admin;password=admin;host=10.10.10.50;sid=TSD;Unicode=True;"Shalex wrote:Sorry for the inconvenience. The reason was in our sample code - the connection property was reinitialized in the btConnect_Click() method. dotConnect for Oracle works fine.
2. I retrieve values from VARCHAR2
3. No. I haven't try. The previous soft which we a using now (foreign company write it for us) is work fine. They use CoreLab.Oracle.dll (4.25.24.1). But I can try, if I find.
4. I just use your sample demo C:\Program Files\Devart\dotConnect Mobile\Oracle\Samples\DataReader
Be aware, even if you set the OracleConnection.ConnectionString property in MainForm.cs of the C:\Program Files\Devart\dotConnect Mobile\Oracle\Samples\DataReader demo, it will be reinitialized by the btConnect_Click() method in ConnectForm.cs. Please try adding the following line of code before the try...catch statement in the btConnect_Click() method:
Please notify us about the results.
Code: Select all
connection.Unicode = true;
I try this in Connect method:
ConnectForm connectForm = new ConnectForm(OracleConnection);
if (OracleConnection.Unicode) MessageBox.Show("1");
connectForm.ShowDialog(); //this method set Unicode to false
if (OracleConnection.Unicode) MessageBox.Show("11");
First message box is shown, but second is not. Connection close after I try to set property again ().
ConnectForm connectForm = new ConnectForm(OracleConnection);
if (OracleConnection.Unicode) MessageBox.Show("1");
connectForm.ShowDialog(); //this method set Unicode to false
if (OracleConnection.Unicode) MessageBox.Show("11");
First message box is shown, but second is not. Connection close after I try to set property again ().
Please read carefully my previous post. Just replace the btConnect_Click method in the ConnectForm.cs file with the following code (the difference in the "connection.Unicode = true;" line):Please notify us about the results.
Code: Select all
private void btConnect_Click(object sender, System.EventArgs e) {
connection.Close();
connection.ConnectionString = "";
connection.UserId = tbUser.Text;
connection.Password = tbPassword.Text;
connection.Port = Convert.ToInt32(tbPort.Text);
connection.Server = tbHost.Text;
connection.Sid = tbDatabase.Text;
connection.Unicode = true;
try {
Cursor.Current = Cursors.WaitCursor;
connection.Open();
Cursor.Current = Cursors.Default;
DialogResult = DialogResult.OK;
}
catch {
Cursor.Current = Cursors.Default;
retries--;
if (retries == 0)
DialogResult = DialogResult.Cancel;
throw;
}
}