I am using ADO to open text files as a recordset in VB6, but the files are not opening correctly - they won't read the column headers. I believe the problem is the encoding/code page of the text file. The files are supplied by a vendor so I can't control the encoding, but some are UTF-8, and I'm sure others will vary.
Once I convert them to ANSI my code works correctly. Two questions - what code page does ADO expect, and can I open the file specifying the codepage? I'm using the following to open the file:
ImportConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & ImportDirectoryName & ";" & _
Second, I found code that tells me what encoding the file uses, but I am having trouble finding code that will convert the file. If I need to use ANSI, can someone tell me an efficient way in VB6 to convert the file so I can import it properly?