character encoding - c# lotus dbase ODBC charset -
i trying read lotus dbase file in order export data. using code:
enter code here 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 connection, , if open successfully, can seek query connection.open(); if (connection.state == connectionstate.open) { string mysql = @"select * 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 greek leters appears "╠┴═╧╙ ═╔╩╧╦╧╒─╟╙" not know charset been used. can do? in advance
you should utilize 737 code page in connection string:
;charset=737
c# character-encoding dbase
No comments:
Post a Comment