Board index » Visual Studio » special characters
|
ctkevin
|
special characters
Visual Studio383
Hi, I'm using ADO 2.6 and VB 6.0. I have to open a text file a asign it to a recordset. The text file has fileds and its own schema.ini file. My problem is when I read Spanish characters, such as � it converts it to � and the ñ to ¦ How can avoid this conversions? it's not the code that its making it, its ADO. ---------------------------------------------------------------------------------------- This is the schema.ini header: [Myfile.txt] ColNameHeader = True Format=TabDelimited MaxScanRows = 25 CharacterSet=OEM Col1="Column1" Integer Col2="Column2" Integer ...etc.. The recordset is opened twice like this: Set rstConsulta_t = New ADODB.Recordset rstConsulta_t.Open "SELECT * FROM Myfile.txt", "Driver={Microsoft Text Driver (*.txt; *.csv)};Initial Catalog=" & strWorkDir_p & ";", adOpenStatic, adLockBatchOptimistic If Trim(Dir(strWorkDir_p & "Myfile.dtg", vbArchive)) <>"" Then Kill strWorkDir_p & "Myfile.dtg" rstConsulta_t.Save strWorkDir_p & "Myfile.dtg", adPersistADTG rstConsulta_t.Close Set rstConsulta_t = Nothing Kill strWorkDir_p & "Myfile.txt" Set rstConsulta_t = New ADODB.Recordset rstConsulta_t.Open strWorkDir_p & "Myfile.dtg", "Provider=MSPersist", adOpenDynamic, adLockBatchOptimistic, adCmdFile The objective of opening it twice is to speed up some processes which are provided with the ADTG file format. -- Thanks, Rick. "For every problem, there is a solution that is simple, neat, and wrong." H. L. Mencken" - |
