DoCmd.TransferText error

A

Alan W

I have a fuction() that I have been using for two or three years now it is
not working I get a Run-Time error '3270'

The code I been using is

Public Function ImportCFN_PT()
If Len(Dir("S:\CFN_PT\PT\pt*")) Then
FileCopy "S:\CFN_PT\PT\" & Dir("S:\CFN_PT\PT\pt*"), "S:\CFN_PT\BKUP_PT\" &
Dir("S:\CFN_PT\PT\pt*")
End If

If Len(Dir("S:\CFN_PT\PT\pt*")) Then
Name "S:\CFN_PT\PT\" & Dir("S:\CFN_PT\PT\pt*") As "S:\CFN_PT\PT\standard.txt"
End If

If Len(Dir("S:\CFN_PT\PT\*.txt")) Then
DoCmd.SetWarnings False
DoCmd.TransferText acImportFixed, "PT_File_Import_Specification",
"Imported_PT_Tbl", "S:\CFN_PT\PT\standard.txt", False, ""
End If

If Len(Dir("S:\CFN_PT\PT\*.txt")) Then
Kill "S:\CFN_PT\PT\standard.txt"
End If

End Function


The code stops at the line DoCmd.TransferText acImportFixed,
"PT_File_Import_Specification", "Imported_PT_Tbl",
"S:\CFN_PT\PT\standard.txt", False, ""

The PT_File_ImportSpecification is as follows

Field Name Data Type Start Width Indexed Skip
SiteID Long Integer 1 6 Yes (Duplicates OK) 0
SeqNum Text 7 4 No 0
StatusCode Text 11 2 No 0
TotalAmt Text 13 6 Yes (Duplicates OK) 0
AccToCharge Text 19 2 No 0
TransType Text 21 2 No 0
PrdCode Text 23 2 Yes (Duplicates OK) 0
Price Text 25 8 Yes (Duplicates OK) 0
Qty Text 33 8 Yes (Duplicates OK) 0
Odometer Text 41 8 No 0
PumpNum Text 49 2 No 0
TransactionNum Text 51 4 No 0
DateCompleted Text 55 6 Yes (Duplicates OK) 0
TimeCompleted Text 61 4 Yes (Duplicates OK) 0
ErrorCode Text 65 2 No 0
AuthorizationNum Text 67 6 No 0
ManEntryNum Text 73 8 No 0
CardIdString Text 81 20 No 0
SiteTaxLocation Text 101 8 Yes (Duplicates OK) 0
SiteTaxCode Text 109 40 Yes (Duplicates OK) 0
SiteTaxAmt Text 149 80 No 0
TransLocationIndicator Text 229 1 Yes (Duplicates OK) 0
NetworkIndicator Text 230 2 Yes (Duplicates OK) 0
Filler1 Text 232 4 No 0
AccessFee Text 236 4 No 0
Filler2 Text 240 4 No 0
HaulRate Text 244 4 No 0
CardLockPrice Text 248 8 No 0

The Database Referance are set as follows

Visual Basic For Applacation
MS Access 10.0 Object Lib
OLE Automation
MS ActiveX Data Objects 2.1 Lib
MS DAO 3.6 Object Lib
 
A

Alan W

I think I found my own problem, the back end database hit the 2 GB limit. I
am know moving records to make more room. That should allow the transfer to
take place with out Access getting upset.
 

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