Ok, you are using the text isam driver to read the text file.
I dont't know but from
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odbc/htm/odbcjetschema_ini_file.asp
it doesn't seem it supports other encoding than ANSI or OEM.
Do you have a byte order mark at the beginning of the file ?
If the text isam driver doesn't support unicode, you could convert the text
file from unicode to ansi before reading the converted file with the text
isam driver.
See :
http://msdn.microsoft.com/library/d...-us/cpguide/html/cpconreadingtextfromfile.asp
You'll use an argument in the constructor of the stream reader to tell the
file is using Unicode and you'll tell for the stream writer it should use
ANSI. This way you'll have a file that the text isam driver can read
properly.
Patrice
"Ritu" <
[email protected]> a écrit dans le message de
Thanks Patrice for your quick response.
Can u please tell me that where we have to specify the
argumnet mentioning the encoding of file ?
My present code is as follows:-
Dim oConn As OleDb.OleDbConnection = New
OleDb.OleDbConnection
("Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=c:\;Extended
Properties=""text;HDR=Yes;FMT=Delimited""")
oConn.Open()
Dim OCommand As OleDbCommand = New OleDbCommand
Dim OAdaptor As OleDbDataAdapter = New OleDbDataAdapter
Dim ODataSet As DataSet = New DataSet
OCommand.Connection = oConn
OCommand.CommandText = "Select * from test1.txt"
OAdaptor.SelectCommand = OCommand
OAdaptor.Fill(ODataSet )
Here Test1.txt is unicode file.
Thanx
Ritu