LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Excel OLEDB reading Chinese characters 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
}
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Chinese Characters ! John New Users to Excel 0 March 9th 07 11:24 PM
Excel, OLEDB and uppercase problem. witek Excel Programming 5 June 14th 06 07:04 PM
Write Line problem when writing simplified chinese characters KI LEE Excel Programming 7 August 17th 05 05:41 AM
Excel OLEDB format problem... Terry Mulvany Excel Programming 0 April 12th 05 06:44 PM
Chinese characters lazyboy Excel Discussion (Misc queries) 0 March 15th 05 04:19 AM


All times are GMT +1. The time now is 07:00 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"