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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top