Truncation of memo fields using DoCmd.TransferText acImportDelim,


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
 
Ad

Advertisements

G

Gina Whipp

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
 

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