I am trying to import tab delimited text file into a
recordset. The code I am using is
conn_string = "Driver={Micros oft Text Driver (*.txt;
*.csv)};Dbq=c:\ AMPS\Files\2538 ;DefaultDir=c:\ temp;Extension
s=asc,csv,tab,t xt;"
Set con = New ADODB.Connectio n
Set rst = New ADODB.Recordset
con.ConnectionS tring = strcs
con.Open
rst.Open "zzz.txt", strcs, adOpenStatic,
adLockReadOnly, adCmdTable
If any of the columns in the file is more than 256
characters, then open recordset fails. The message
is "Run-time error - [Microsoft][ODBC Text Driver] The
size of a field is too long". Is there any way of reading
fields with more than 256 characters?
Thanks
recordset. The code I am using is
conn_string = "Driver={Micros oft Text Driver (*.txt;
*.csv)};Dbq=c:\ AMPS\Files\2538 ;DefaultDir=c:\ temp;Extension
s=asc,csv,tab,t xt;"
Set con = New ADODB.Connectio n
Set rst = New ADODB.Recordset
con.ConnectionS tring = strcs
con.Open
rst.Open "zzz.txt", strcs, adOpenStatic,
adLockReadOnly, adCmdTable
If any of the columns in the file is more than 256
characters, then open recordset fails. The message
is "Run-time error - [Microsoft][ODBC Text Driver] The
size of a field is too long". Is there any way of reading
fields with more than 256 characters?
Thanks
Comment