opening text file

B

Blazej

Hi,

I got a problem with opening txt file (fixed width) through VBA code with:

Dim rst As New ADODB.Recordset

conn.Open "Driver={Microsoft Text Driver (*.txt; *.csv)};" & _
" DBQ=D:\path\"

rst.Open "Select * from [filename]", conn, adOpenStatic, adLockReadOnly,
adCmdText

MS text driver is default set on reading data grouped in fields (fixed
width) so peridically it takes null to variables, while i would like it to
read data as a one field in recordset.


Best,

Blazej
 
Top