locked
c# dbase3 greek charset RRS feed

  • Question

  • hi to all,

    i want to read the data from a dbase3 dbf file.

    i am using this code:

            private void odbc()
            {
                DataTable YourResultSet = new DataTable();
    
                string strAccessConn = @"Driver={Microsoft dBase Driver (*.dbf)};SourceType=DBF;SourceDB=C:\shares\lotus;Exclusive=No;NULL=NO;DELETED=NO;BACKGROUNDFETCH=NO;CHARSET=928";
    
                OdbcConnection connection = new OdbcConnection(strAccessConn);
    
                // Open the connection, and if open successfully, you can try to query it
                connection.Open();
    
                if (connection.State == ConnectionState.Open)
                {
                    string mySQL = @"select * from C:\shares\lotus\techtime.DBF";  // dbf table name
    
                    OdbcCommand MyQuery = new OdbcCommand(mySQL, connection);
                    OdbcDataAdapter DA = new OdbcDataAdapter(MyQuery);
    
                    DA.Fill(YourResultSet);
    
                    connection.Close();
                }
    
                string myString = YourResultSet.Rows[0][4].ToString();
            }

    but when the result supposed to bee greek letters my string is like this: "╠┴═╧╙ ═╔╩╧╦╧╒─╟╙"

    i have already tryied 28597, 813, 928, 737 charset with out success

    can i do anything

    thanks in advance

    • Moved by Kristin Xie Monday, October 20, 2014 5:50 AM
    Friday, October 17, 2014 8:15 PM

All replies

  • Hi friend ,

    According to your code, since you are using Lotus dbase,I think you should also ask this question in IBM Lotus Notes Forum as this Lotus Notes provider is developed by IBM. So, you can get a better help.

    http://www.ibm.com/developerworks/lotus/community/

    Thanks for your understanding.

    Have a nice day!

    Kristin


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    • Edited by Kristin Xie Monday, October 20, 2014 5:50 AM
    Monday, October 20, 2014 5:48 AM