If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > Microsoft Excel > Excel OLEDB reading Chinese characters unicode problem

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-11-06, 23:51
mav8 mav8 is offline
Registered User
 
Join Date: Sep 2006
Posts: 3
Question Excel OLEDB reading Chinese characters unicode problem

Hi All

I have an excel sheet with Chinese characters in them.

I'm using the OLEBE 4.0 Jet Driver in C# Microsoft Visual Studio 2005 to read from the Excel sheet and then enter into mySQL database.

The problem isn't with mysql but with C# reading the chinese characters from Excel.

Right now, All I get with chinese characters is question marks "?????????"

MY OLEDB driver should be able to support multi-language but it doesn't seem to be working.

Can anyone help?

Code:
 String sConnectionString = 
            "Provider=Microsoft.Jet.OLEDB.4.0;" +
            @"Data Source=C:\language.xls;" + 
            "Extended Properties=Excel 8.0;"; 

            OleDbConnection objConn = new OleDbConnection(sConnectionString);

            objConn.Open();

            OleDbCommand objCmdSelect = new OleDbCommand("SELECT * FROM [Sheet1$]", objConn);
            OleDbDataReader reader = objCmdSelect.ExecuteReader();


            //---
            String myConnectionString = "server=192.168.168.6;uid=xxxx;pwd=xxxxx;database=xxxxxxx_db;";
            MySqlConnection myConnection = new MySqlConnection(myConnectionString);
             
 while (reader.Read())
             {

*this is where I generate my sql query
}
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On