V
Va
I am trying to import tab delimited text file into a
recordset. The code I am using is
conn_string = "Driver={Microsoft Text Driver (*.txt;
*.csv)};Dbq=c:\AMPS\Files\2538;DefaultDir=c:\temp;Extension
s=asc,csv,tab,txt;"
Set con = New ADODB.Connection
Set rst = New ADODB.Recordset
con.ConnectionString = 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={Microsoft Text Driver (*.txt;
*.csv)};Dbq=c:\AMPS\Files\2538;DefaultDir=c:\temp;Extension
s=asc,csv,tab,txt;"
Set con = New ADODB.Connection
Set rst = New ADODB.Recordset
con.ConnectionString = 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