Truncation of memo fields using DoCmd.TransferText acImportDelim,

  • Thread starter Thread starter JR
  • Start date Start date
J

JR

Having issue with the procedure shown below truncating the memo fields only
when creating the temporary tables that then update the tables in my trusty
Access97 database. The temp tables end up created with each field as a 255
char text field, instead allowing all the entry from a memo field. See the
code below :

' DoCmd.RunSQL "Delete *.* from " & strTable & ";"
'----------- name
strData = strTable & ".txt"
SourceData = SourcePath & strData
TempData = "tblTemp" & strTable & "Import"
TargetData = strTable


'------ copy text file to temp tables **** the truncation of memo
fields is occurring here ****
'DoCmd.DeleteObject acTable, TempData
DoCmd.TransferText acImportDelim, "", TempData, SourceData, True, ""
'---------inserting new data from temp tables to last tables
DoCmd.RunSQL "INSERT INTO " & TargetData & " SELECT " & TempData & ".* FROM
" & TempData & ";"
rst2.MoveNext
 
JR,

See...

http://www.allenbrowne.com/ser-63.html

--
Gina Whipp
2010 Microsoft MVP (Access)

"I feel I have been denied critical, need to know, information!" - Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm

Having issue with the procedure shown below truncating the memo fields only
when creating the temporary tables that then update the tables in my trusty
Access97 database. The temp tables end up created with each field as a 255
char text field, instead allowing all the entry from a memo field. See the
code below :

' DoCmd.RunSQL "Delete *.* from " & strTable & ";"
'----------- name
strData = strTable & ".txt"
SourceData = SourcePath & strData
TempData = "tblTemp" & strTable & "Import"
TargetData = strTable


'------ copy text file to temp tables **** the truncation of memo
fields is occurring here ****
'DoCmd.DeleteObject acTable, TempData
DoCmd.TransferText acImportDelim, "", TempData, SourceData, True, ""
'---------inserting new data from temp tables to last tables
DoCmd.RunSQL "INSERT INTO " & TargetData & " SELECT " & TempData & ".* FROM
" & TempData & ";"
rst2.MoveNext
 
Back
Top